[Documentation] Update exec.exec documentation to mention single quote limitation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the enhancement
The current documentation of exec.exec does not mention the limitation
regarding single quotes and double quotes. In the current implementation,
only double quotes are supported for splitting arguments.
The documentation should be updated to include
this information to prevent confusion and save developers' time.
Current document on exec.exec is as follows.
* @param commandLine command to execute (can include additional args). Must be correctly escaped.
This lacks information on single quotes and double quotes, only the latter of which is supported currently. I would like to append the information on the doc.
Code Snippet
* @param commandLine command to execute (can include additional args). Must be correctly escaped. Currently, only double quotes are supported for splitting args.
Additional information
I spent many hours debugging the reason why the following code did not work as expected
exec.exec(`git config --local some.key 'some value with white space'`)
It is only after I read the internal code that I realized the root cause is the single quotes.
I believe the slight change on doc can prevent developers like me from failing into pitfalls.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the exec.exec parameter documentation in packages/exec/src/exec.ts, then review the argument-splitting context referenced in packages/exec/src/toolrunner.ts. Update the documentation to state the current single-quote limitation, and confirm that the wording accurately reflects the implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100