Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple commands #9

Open
vik0803 opened this issue Apr 26, 2020 · 2 comments
Open

multiple commands #9

vik0803 opened this issue Apr 26, 2020 · 2 comments

Comments

@vik0803
Copy link

vik0803 commented Apr 26, 2020

Hi,

I tried to use your package but it works well for every single command but when I use it within the for loop and have multiple commands in array it doesn't work as needed.

Eg:

cd /var/www/html
mkdir abc
cd abc
touch index.html

now if we execute inflow it should create index.html file in /var/www/html/abc folder.

but whereas using ssh connection in for loop it does create index.html file in /home/ubuntu folder.

content of /home/ubuntu folder is as below
folder:
abc
file
index.html

Appreciate your help if you can guide me to use it as above solution that I am looking forward for.

@vik0803
Copy link
Author

vik0803 commented Apr 26, 2020

@DivineOmega hope you can help on this.

@DivineOmega
Copy link
Owner

@vik0803 Hi there.

Try running the commands individually and calling getOutput and getError between each command.

Alternatively it may just be loosing track of the current active directory. In which case you could try concatenating your commands using &&.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants