summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files/shell.go
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2020-03-07 23:35:35 +0000
committerrillig <rillig@pkgsrc.org>2020-03-07 23:35:35 +0000
commit82478b0998725a8b97a545bd9f70707663228ee8 (patch)
treeb72803d99d5197901a7c87a2a59b767e2d16a7a0 /pkgtools/pkglint/files/shell.go
parent32db7f344d2577bf2ab466b4f0ac637b52bf70a2 (diff)
downloadpkgsrc-82478b0998725a8b97a545bd9f70707663228ee8.tar.gz
pkgtools/pkglint: update to 19.4.10
Changes since 19.4.9: In continuation lines with long values, pkglint no longer suggests to move the continuation backslash in the middle of the variable value, as that would be impossible. Warn when a shell command is assigned to a variable that only takes pathnames. Shell commands can contain command line options, and these are not pathnames. The TOOLS_PLATFORM.tool variables are not defined on every platform. When these variables are used outside an OPSYS check, a warning lists the platforms where the tool is undefined or only defined conditionally.
Diffstat (limited to 'pkgtools/pkglint/files/shell.go')
-rw-r--r--pkgtools/pkglint/files/shell.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/shell.go b/pkgtools/pkglint/files/shell.go
index 41b305f2d8e..99c9f4449a0 100644
--- a/pkgtools/pkglint/files/shell.go
+++ b/pkgtools/pkglint/files/shell.go
@@ -168,7 +168,8 @@ func (scc *SimpleCommandChecker) handleCommandVariable() bool {
varname := varuse.varname
- if vartype := G.Pkgsrc.VariableType(scc.mklines, varname); vartype != nil && vartype.basicType.name == "ShellCommand" {
+ vartype := G.Pkgsrc.VariableType(scc.mklines, varname)
+ if vartype != nil && (vartype.basicType == BtShellCommand || vartype.basicType == BtPathname) {
scc.checkInstallCommand(shellword)
return true
}