Loading bazel/aquery.go +13 −18 Original line number Diff line number Diff line Loading @@ -443,10 +443,8 @@ func (a *aqueryArtifactHandler) depsetContentHashes(inputDepsetIds []uint32) ([] // escapes the args received from aquery and creates a command string func commandString(actionEntry *analysis_v2_proto.Action) string { switch actionEntry.Mnemonic { case "GoCompilePkg", "GoStdlib": argsEscaped := []string{} for _, arg := range actionEntry.Arguments { argsEscaped := make([]string, len(actionEntry.Arguments)) for i, arg := range actionEntry.Arguments { if arg == "" { // If this is an empty string, add '' // And not Loading @@ -454,15 +452,12 @@ func commandString(actionEntry *analysis_v2_proto.Action) string { // 2. `''\'''\'''` (escaped version of '') // // If we had used (1), then this would appear as a whitespace when we strings.Join argsEscaped = append(argsEscaped, "''") argsEscaped[i] = "''" } else { argsEscaped = append(argsEscaped, proptools.ShellEscapeIncludingSpaces(arg)) argsEscaped[i] = proptools.ShellEscapeIncludingSpaces(arg) } } return strings.Join(argsEscaped, " ") default: return strings.Join(proptools.ShellEscapeListIncludingSpaces(actionEntry.Arguments), " ") } } func (a *aqueryArtifactHandler) normalActionBuildStatement(actionEntry *analysis_v2_proto.Action) (*BuildStatement, error) { Loading Loading
bazel/aquery.go +13 −18 Original line number Diff line number Diff line Loading @@ -443,10 +443,8 @@ func (a *aqueryArtifactHandler) depsetContentHashes(inputDepsetIds []uint32) ([] // escapes the args received from aquery and creates a command string func commandString(actionEntry *analysis_v2_proto.Action) string { switch actionEntry.Mnemonic { case "GoCompilePkg", "GoStdlib": argsEscaped := []string{} for _, arg := range actionEntry.Arguments { argsEscaped := make([]string, len(actionEntry.Arguments)) for i, arg := range actionEntry.Arguments { if arg == "" { // If this is an empty string, add '' // And not Loading @@ -454,15 +452,12 @@ func commandString(actionEntry *analysis_v2_proto.Action) string { // 2. `''\'''\'''` (escaped version of '') // // If we had used (1), then this would appear as a whitespace when we strings.Join argsEscaped = append(argsEscaped, "''") argsEscaped[i] = "''" } else { argsEscaped = append(argsEscaped, proptools.ShellEscapeIncludingSpaces(arg)) argsEscaped[i] = proptools.ShellEscapeIncludingSpaces(arg) } } return strings.Join(argsEscaped, " ") default: return strings.Join(proptools.ShellEscapeListIncludingSpaces(actionEntry.Arguments), " ") } } func (a *aqueryArtifactHandler) normalActionBuildStatement(actionEntry *analysis_v2_proto.Action) (*BuildStatement, error) { Loading