#488  [Build] Allow specifying different shell for running commands
Closed
Marcos de Oliveira opened 2 years ago

Currently, one would need to have a script in the source code, and then from the build spec, execute something like bash myscript.sh. Or, have some hack in the commands like: [ "$(readlink /proc/$$/exe)" = "$(which bash)" ] || exec bash $0.

What I propose: Having a field to input the shell (base name or whole path), and then use it in ServerDockerExecutor.java

Robin Shen changed state to 'Closed' 2 years ago
Previous Value Current Value
Open
Closed
Robin Shen commented 2 years ago

Allowing arbitrary shell for running commands might be problematic, as different shell may have different options. Instead OneDev will add direct support for bash (issue #504) and powershell (issue #505), and leave others to be called by user in script.

sokharev commented 1 week ago

Windows have 'old style' powershell.exe and 'new style' pwsh.exe(v6-7x) with some new convinient stuff. Is that possible to add pwsh as well? Because it's very awkward to rewrite ps scripts to old apis. Our current workaround to remove old ps and make mklink powershell.exe pwsh.exe

Robin Shen commented 1 week ago

Will be addressed via #1870

issue 1 of 1
Type
Improvement
Priority
Normal
Assignee
Issue Votes (0)
Watchers (4)
Reference
onedev/server#488
Please wait...
Page is in error, reload to recover