Skip to content

Commit

Permalink
systemd adapter fails with zsh as user shell (#834)
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 Jul 25, 2024
1 parent 65f8ac5 commit 7795adf
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 7795adf

Please sign in to comment.