Skip to content

Commit

Permalink
plugin: don't consider file extension for env prefix
Browse files Browse the repository at this point in the history
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
  • Loading branch information
drakkan committed May 18, 2024
1 parent bfe59cd commit 13513b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, "-", "_")
}

Expand Down

0 comments on commit 13513b5

Please sign in to comment.