File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -146,10 +146,14 @@ func execTmuxp(name string, command string) error {
146146 return nil
147147}
148148
149+ func removeTrailingSlash (path string ) string {
150+ return strings .TrimRight (path , "/" )
151+ }
152+
149153func getStartupScript (sessionPath string , config * config.Config ) string {
150154 for _ , sessionConfig := range config .SessionConfigs {
151155 // TODO: get working with /* again
152- scriptFullPath := dir .FullPath (sessionConfig .Path )
156+ scriptFullPath := removeTrailingSlash ( dir .FullPath (sessionConfig .Path ) )
153157 match , _ := filepath .Match (scriptFullPath , sessionPath )
154158 if match {
155159 return sessionConfig .StartupScript
@@ -160,7 +164,7 @@ func getStartupScript(sessionPath string, config *config.Config) string {
160164
161165func getStartupCommand (sessionPath string , config * config.Config ) string {
162166 for _ , sessionConfig := range config .SessionConfigs {
163- scriptFullPath := dir .FullPath (sessionConfig .Path )
167+ scriptFullPath := removeTrailingSlash ( dir .FullPath (sessionConfig .Path ) )
164168 match , _ := filepath .Match (scriptFullPath , sessionPath )
165169 if match {
166170 return sessionConfig .StartupCommand
You can’t perform that action at this time.
0 commit comments