[Build] Allow specifying different shell for running commands (OD-488)
Marcos de Oliveira opened 4 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' 4 years ago
    Previous Value Current Value
    Open
    Closed
  • Robin Shen commented 4 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 2 years 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 2 years ago

    Will be addressed via #1870

issue 1/1
Type
Improvement
Priority
Normal
Assignee
Issue Votes (0)
Watchers (4)
Reference
OD-488
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover