You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although Ballerina is intended to be an Integration Language, it can be handy when it comes to scripting, especially automation works.
I've recently wanted to write a script to do some change in multiple repos, and send PRs to the respective repos. I wanted to do this using Ballerina, but the existing ballerina/os package has some limitations when doing so.
The main issue was the inability to change the current working directory. Our existing os:exec function does not have a way to change the working directory. Of course we can hack it to provide cd /path/to/working/dir; <MY_COMAND>, but this isn't an ideal solution.
I've found a previous discussion on the os:exec function, where it mentions that the first iteration will not include the working directory path, but without it, the exec function is more or less useless. Therefore i'd propose to implement the functionality to change the current working directory.
Suggested Improvement
There are two options to do this;
Change the current working directory using a separate method
Provide a way to pass the working directory to os:exec function
Version
No response
The text was updated successfully, but these errors were encountered:
Current Limitation
Although Ballerina is intended to be an Integration Language, it can be handy when it comes to scripting, especially automation works.
I've recently wanted to write a script to do some change in multiple repos, and send PRs to the respective repos. I wanted to do this using Ballerina, but the existing
ballerina/os
package has some limitations when doing so.The main issue was the inability to change the current working directory. Our existing
os:exec
function does not have a way to change the working directory. Of course we can hack it to providecd /path/to/working/dir; <MY_COMAND>
, but this isn't an ideal solution.I've found a previous discussion on the
os:exec
function, where it mentions that the first iteration will not include the working directory path, but without it, theexec
function is more or less useless. Therefore i'd propose to implement the functionality to change the current working directory.Suggested Improvement
There are two options to do this;
os:exec
functionVersion
No response
The text was updated successfully, but these errors were encountered: