fix: Use ENV variable instead of session name

master
Ivan 2 years ago committed by GitHub
parent ec05ffef1e
commit 856940b719
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -38,7 +38,7 @@ type Config struct {
func addDefaultEnvs(c *Config, path string) {
c.Env["SMUG_SESSION"] = c.Session
c.Env["SMUG_SESSION_NAME"] = c.Session
c.Env["SMUG_SESSION_CONFIG_PATH"] = path
}
func EditConfig(path string) error {

@ -87,15 +87,8 @@ func main() {
var configPath string
if options.Config != "" {
configPath = options.Config
} else if options.Project != "" {
configPath = filepath.Join(userConfigDir, options.Project+".yml")
} else {
s, err := tmux.SessionName()
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
configPath = filepath.Join(userConfigDir, s+".yml")
configPath = filepath.Join(userConfigDir, options.Project+".yml")
}
switch options.Command {

Loading…
Cancel
Save