forked from toolshed/abra
		
	fix: thread app name & stack name correctly
This commit is contained in:
		| @ -104,10 +104,10 @@ Example: | |||||||
| 			var sourceAndExec string | 			var sourceAndExec string | ||||||
| 			if hasCmdArgs { | 			if hasCmdArgs { | ||||||
| 				logrus.Debugf("parsed following command arguments: %s", parsedCmdArgs) | 				logrus.Debugf("parsed following command arguments: %s", parsedCmdArgs) | ||||||
| 				sourceAndExec = fmt.Sprintf("TARGET=local; APP_NAME=%s; . %s; %s %s", app.StackName(), abraSh, cmdName, parsedCmdArgs) | 				sourceAndExec = fmt.Sprintf("TARGET=local; APP_NAME=%s; STACK_NAME=%s; . %s; %s %s", app.Name, app.StackName(), abraSh, cmdName, parsedCmdArgs) | ||||||
| 			} else { | 			} else { | ||||||
| 				logrus.Debug("did not detect any command arguments") | 				logrus.Debug("did not detect any command arguments") | ||||||
| 				sourceAndExec = fmt.Sprintf("TARGET=local; APP_NAME=%s; . %s; %s", app.StackName(), abraSh, cmdName) | 				sourceAndExec = fmt.Sprintf("TARGET=local; APP_NAME=%s; STACK_NAME=%s; . %s; %s", app.Name, app.StackName(), abraSh, cmdName) | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
| 			cmd := exec.Command("/bin/sh", "-c", sourceAndExec) | 			cmd := exec.Command("/bin/sh", "-c", sourceAndExec) | ||||||
| @ -198,9 +198,9 @@ func runCmdRemote(app config.App, abraSh, serviceName, cmdName, cmdArgs string) | |||||||
|  |  | ||||||
| 	var cmd []string | 	var cmd []string | ||||||
| 	if cmdArgs != "" { | 	if cmdArgs != "" { | ||||||
| 		cmd = []string{"/bin/sh", "-c", fmt.Sprintf("TARGET=%s; APP_NAME=%s; . /tmp/abra.sh; %s %s", serviceName, app.StackName(), cmdName, cmdArgs)} | 		cmd = []string{"/bin/sh", "-c", fmt.Sprintf("TARGET=%s; APP_NAME=%s; STACK_NAME=%s; . /tmp/abra.sh; %s %s", serviceName, app.Name, app.StackName(), cmdName, cmdArgs)} | ||||||
| 	} else { | 	} else { | ||||||
| 		cmd = []string{"/bin/sh", "-c", fmt.Sprintf("TARGET=%s; APP_NAME=%s; . /tmp/abra.sh; %s", serviceName, app.StackName(), cmdName)} | 		cmd = []string{"/bin/sh", "-c", fmt.Sprintf("TARGET=%s; APP_NAME=%s; STACK_NAME=%s; . /tmp/abra.sh; %s", serviceName, app.Name, app.StackName(), cmdName)} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	logrus.Debugf("running command: %s", strings.Join(cmd, " ")) | 	logrus.Debugf("running command: %s", strings.Join(cmd, " ")) | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user