Skip to content

Keep scontrol values that contain a space - #47

Open
fedonman wants to merge 1 commit into
mainfrom
fixed/scontrol-values-with-spaces
Open

Keep scontrol values that contain a space#47
fedonman wants to merge 1 commit into
mainfrom
fixed/scontrol-values-with-spaces

Conversation

@fedonman

@fedonman fedonman commented Sep 6, 2026

Copy link
Copy Markdown
Owner

parse_scontrol_kv split the output on whitespace and cut each token at its first =, so a value with a space in it stopped at the space. The four values sqwatch keeps from scontrol are all user-controlled paths, so a working directory like /scratch/Smith Lab came back as /scratch/Smith and the log pane sat waiting on a path that does not exist. Keys are now found with a regex and each value runs to the start of the next key. Seven tests cover it, including the ordinary output that has no spaces in it.

Closes #11

parse_scontrol_kv split on whitespace and then cut each token at its
first =, so any value with a space in it stopped at that space. All four
values sqwatch keeps are user-controlled paths, so a scratch directory
with a space in its name gave the wrong path and the log pane waited on
a file that was never going to appear. Find the keys with a regex and
take each value up to the start of the next one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: scontrol values are truncated at the first space

1 participant