Skip to content

Commit

Permalink
ci: minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikubill committed Apr 14, 2022
1 parent e4edf71 commit 7a44ca3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- name: install
uses: actions/setup-go@v1
with:
go-version: 1.14.x
go-version: 1.18.x

- name: checkout
uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.18

-
name: Run GoReleaser
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- name: install
uses: actions/setup-go@v1
with:
go-version: 1.14.x
go-version: 1.18.x

- name: checkout
uses: actions/checkout@v1
Expand All @@ -19,7 +19,7 @@ jobs:
- name: test - default
run: |
./ci-test-linux-amd64 --no-progress -o test -f $(./ci-test-linux-amd64 --silent go.sum)
./ci-test-linux-amd64 --no-progress -o test -f $(./ci-test-linux-amd64 cat --silent go.sum)
cmp test go.sum
- name: test - multi
Expand Down
13 changes: 11 additions & 2 deletions cmd/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,17 @@ func runner(backend apis.BaseBackend) func(cmd *cobra.Command, args []string) {
}
}

for _, item := range args {
if !inList(links, item) && !inList(file, item) && !strings.HasPrefix(item, "-") {
for k, item := range args {
isCommand := false
if strings.HasPrefix(item, "-") {
isCommand = true
}
if k > 1 {
if strings.HasPrefix(args[k-1], "-") {
isCommand = true
}
}
if !inList(links, item) && !inList(file, item) && !isCommand {
fmt.Printf("transfer: %s: No such file, link or directory\n", item)
}
}
Expand Down

0 comments on commit 7a44ca3

Please sign in to comment.