Skip to content

Commit

Permalink
fix: bug when using urls as default string argument values
Browse files Browse the repository at this point in the history
  • Loading branch information
dreadl0ck committed Jan 27, 2022
1 parent 4c00f55 commit dde4681
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion arguments.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (c *CommandsFile) validateArgs(args []string) ([]*commandArg, error) {
defaultValue string
)

if len(slice) == 2 {
if len(slice) > 1 {

// argument name may contain leading whitespace - trim it
var argumentName = strings.TrimSpace(slice[0])
Expand Down
2 changes: 2 additions & 0 deletions tests/zeus/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ commands:
- user:String? = bob
- password:String
- ipAddr:String
- host:String? = "http://examplehost.com"
- port:Int? = 80
dependencies:
outputs:
Expand All @@ -129,6 +130,7 @@ commands:
print("user=" + user)
print("password=" + password)
print("ipAddr=" + ipAddr)
print("host=" + host)
print("port=" + port)
buildNumber:
Expand Down
11 changes: 9 additions & 2 deletions tests/zeus/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# /_____ \\___ >____//____ >
# \/ \/ \/
# Build System
# v0.9.7
# v0.9.11
#

buildNumber: 3
Expand All @@ -15,7 +15,14 @@ events:
1184e2da72dbcd1b:
name: config watcher
id: 1184e2da72dbcd1b
path: tests/zeus/config.yml
path: zeus/config.yml
op: 2
fileextension: .yml
command: internal
36580bfa43cd9606:
name: commandsFile watcher
id: 36580bfa43cd9606
path: zeus/commands.yml
op: 2
fileextension: .yml
command: internal
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ package main

// zeus version
// generated with the gen-version command
var version = "0.9.9"
var version = "0.9.11"
2 changes: 1 addition & 1 deletion zeus/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ language: bash
globals:
binaryName: zeus
buildDir: bin
version: 0.9.11
version: 0.9.12

# all commands
# available fields:
Expand Down

0 comments on commit dde4681

Please sign in to comment.