Skip to content
This repository has been archived by the owner on Apr 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #58 from AtkinsSJ/fix-help-option-output
Browse files Browse the repository at this point in the history
help: Copy the DEFAULT_OPTIONS object rather than directly adding to it
  • Loading branch information
KernelDeimos authored Mar 12, 2024
2 parents 03b15d6 + 57dff3e commit 4076f7f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/puter-shell/coreutils/coreutil_lib/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export const DEFAULT_OPTIONS = {

export const printUsage = async (command, out, vars) => {
const { name, usage, description, args } = command;
const options = Object.assign(DEFAULT_OPTIONS, args.options);
const options = Object.create(DEFAULT_OPTIONS);
Object.assign(options, args.options);

const heading = text => {
out.write(`\x1B[34;1m${text}:\x1B[0m\n`);
Expand Down

0 comments on commit 4076f7f

Please sign in to comment.