MetOffice / MetOffice/fab

Shell tool should accept list of parameters

Open
#519 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Python
Stars
9
Forks
9
Avg merge
12d 12h
Merged PRs (30d)
2

Description

When calling a shell using `-c`, it needs the command and all parameters as a single string (`sh -c "nf-config --fflags"`).

ATM, the shell tool does accept a list of parameters, but will not convert them all into a single string, instead they will be passed on as list, so in the example above it would be `['-c', '-nf-config', '--fflags'` ), so `--fflags` would be a shell parameter, not a parameter to `nf-config`).

That's easy to work around in an application, but might result in unexpected behaviour.

Additionally, `cwd` and `env` could be useful as additional optional parameters.

Contributor guide

Open the contributing guide

Research direction

Locate the shell tool implementation and inspect how a list of parameters is currently passed to `sh -c`. Verify the expected command and argument behavior, then consider the requested optional `cwd` and `env` parameters; done means list arguments behave correctly and those options are supported if included.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.