Skip to content

Commit 0a6b2bd

Browse files
committed
Fix additional static analyzer warnings
1 parent 695f4be commit 0a6b2bd

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

nodes/dir-walk@v1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func walk(root string, opts walkOpts, pattern []string, items map[string]os.File
154154
})
155155

156156
} else {
157-
entries, err := os.ReadDir(root)
157+
entries, err := os.ReadDir(filepath.Clean(root))
158158
if err != nil {
159159
return "", core.CreateErr(nil, err, "failed to read directory")
160160
}

nodes/run@v1.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ func runCommand(c *core.ExecutionState, shell string, script *string, args []str
249249
curEnvMap["PYTHONIOENCODING"] = "utf-8"
250250

251251
args = append([]string{scriptPath}, args...)
252+
default:
253+
return "", 0, core.CreateErr(c, nil, "unsupported shell: %s", shell)
252254
}
253255
cmd = exec.Command(shell, args...)
254256

0 commit comments

Comments
 (0)