mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-25 00:50:31 +00:00
plugin: don't consider file extension for env prefix
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
50a3c0d911
commit
3c7a651d27
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