Skip to content

Commit

Permalink
systemd adapter fails with zsh as user shell
Browse files Browse the repository at this point in the history
zsh interprets the * in ondemand-* as a file path and returns an error if nothing is matched (unless the user has set 'setopt no_nomatch' in their .zshrc. Escape it to pass the asterisk on to systemctl (so it can be parsed internally).
  • Loading branch information
m0zes authored Mar 29, 2024
1 parent c397b50 commit 185458b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ood_core/job/adapters/systemd/launcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def unique_session_name

# List all Systemd sessions on destination_host started by this adapter
def list_remote_systemd_session(destination_host)
cmd = ssh_cmd(destination_host, ['systemctl', '--user', 'show', '-t', 'service', '--state=running', "#{session_name_label}-*"])
cmd = ssh_cmd(destination_host, ['systemctl', '--user', 'show', '-t', 'service', '--state=running', "#{session_name_label}-\\*"])

# individual units are separated with an empty line
call(*cmd).split("\n\n").map do |oneunit|
Expand Down

0 comments on commit 185458b

Please sign in to comment.