GitHub env file support (#426)
* Upgrade to the official golangci-lint action and fix some issues it found * Update deps * Remove a shadow warning * Initialize the splitPattern only once * Initial attempt at supporting $GITHUB_ENV Needs some polishing and tests * Now it's actually working * Replace golang.org/x/crypto/ssh/terminal with golang.org/x/term * Disable the issue-228 test again * The linter is picky * Discovered that the workflow/envs.txt had to exist in certain cases * Fix small linter issue
This commit is contained in:
@@ -13,7 +13,7 @@ var commandPatternADO *regexp.Regexp
|
||||
|
||||
func init() {
|
||||
commandPatternGA = regexp.MustCompile("^::([^ ]+)( (.+))?::([^\r\n]*)[\r\n]+$")
|
||||
commandPatternADO = regexp.MustCompile("^##\\[([^ ]+)( (.+))?\\]([^\r\n]*)[\r\n]+$")
|
||||
commandPatternADO = regexp.MustCompile("^##\\[([^ ]+)( (.+))?]([^\r\n]*)[\r\n]+$")
|
||||
}
|
||||
|
||||
func (rc *RunContext) commandHandler(ctx context.Context) common.LineHandler {
|
||||
@@ -103,7 +103,7 @@ func unescapeCommandData(arg string) string {
|
||||
"%0A": "\n",
|
||||
}
|
||||
for k, v := range escapeMap {
|
||||
arg = strings.Replace(arg, k, v, -1)
|
||||
arg = strings.ReplaceAll(arg, k, v)
|
||||
}
|
||||
return arg
|
||||
}
|
||||
@@ -116,7 +116,7 @@ func unescapeCommandProperty(arg string) string {
|
||||
"%2C": ",",
|
||||
}
|
||||
for k, v := range escapeMap {
|
||||
arg = strings.Replace(arg, k, v, -1)
|
||||
arg = strings.ReplaceAll(arg, k, v)
|
||||
}
|
||||
return arg
|
||||
}
|
||||
|
Reference in New Issue
Block a user