plugin: don't consider file extension for env prefix
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
bfe59cd8f8
commit
13513b563b
1 changed files with 3 additions and 1 deletions
|
@ -118,7 +118,9 @@ func (c *Config) getEnvVarPrefix() string {
|
|||
return c.EnvPrefix
|
||||
}
|
||||
|
||||
prefix := strings.ToUpper(filepath.Base(c.Cmd)) + "_"
|
||||
baseName := filepath.Base(c.Cmd)
|
||||
name := strings.TrimSuffix(baseName, filepath.Ext(baseName))
|
||||
prefix := strings.ToUpper(name) + "_"
|
||||
return strings.ReplaceAll(prefix, "-", "_")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue