tools: polish exec preflight
This commit is contained in:
parent
53cd653cf1
commit
52f1fb0556
1 changed files with 5 additions and 3 deletions
|
|
@ -113,7 +113,9 @@ var (
|
||||||
}
|
}
|
||||||
|
|
||||||
scriptPreflightEnvVarPattern = regexp.MustCompile(`\$[A-Z_][A-Z0-9_]{1,}`)
|
scriptPreflightEnvVarPattern = regexp.MustCompile(`\$[A-Z_][A-Z0-9_]{1,}`)
|
||||||
scriptPreflightNodePattern = regexp.MustCompile(`(?m)^[ \t]*(?:NODE\s+["'][^"']+["']|(?:bash|sh)\s+-c\b|export\s+[A-Za-z_][A-Za-z0-9_]*=)`)
|
scriptPreflightNodePattern = regexp.MustCompile(
|
||||||
|
`(?m)^[ \t]*(?:NODE\s+["'][^"']+["']|(?:bash|sh)\s+-c\b|export\s+[A-Za-z_][A-Za-z0-9_]*=)`,
|
||||||
|
)
|
||||||
envAssignmentPattern = regexp.MustCompile(`^[A-Za-z_][A-Za-z0-9_]*=`)
|
envAssignmentPattern = regexp.MustCompile(`^[A-Za-z_][A-Za-z0-9_]*=`)
|
||||||
interpreterPipePattern = regexp.MustCompile(
|
interpreterPipePattern = regexp.MustCompile(
|
||||||
`(?i)(?:^|[|;&]\s*)(?:env\s+)?(?:python(?:\d+(?:\.\d+)?)?|node(?:js)?)\b`,
|
`(?i)(?:^|[|;&]\s*)(?:env\s+)?(?:python(?:\d+(?:\.\d+)?)?|node(?:js)?)\b`,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue