curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #02408
[Merge] curtin:usage-json-double-quotes into curtin:master
Olivier Gayot has proposed merging curtin:usage-json-double-quotes into curtin:master.
Commit message:
usage: fix help that showed invalid JSON in examples
The usage showed examples to override the stages that are executed when running curtin install. That said, JSON only accepts strings surrounded by double quotes and the examples use single quotes. This leads to invalid JSON syntax if the examples are copied.
Fixed by inverting the quotes used in the examples so that the examples are valid.
Requested reviews:
curtin developers (curtin-dev)
For more details, see:
https://code.launchpad.net/~curtin-dev/curtin/+git/curtin/+merge/427169
usage: fix help that showed invalid JSON in examples
The usage showed examples to override the stages that are executed when running curtin install. That said, JSON only accepts strings surrounded by double quotes and the examples use single quotes. This leads to invalid JSON syntax if the examples are copied.
Fixed by inverting the quotes used in the examples so that the examples are valid.
--
Your team curtin developers is requested to review the proposed merge of curtin:usage-json-double-quotes into curtin:master.
diff --git a/curtin/commands/install.py b/curtin/commands/install.py
index 0e20e41..7d108d1 100644
--- a/curtin/commands/install.py
+++ b/curtin/commands/install.py
@@ -526,7 +526,7 @@ CMD_ARGUMENTS = (
'help': ('define a config variable. key can be a "/" '
'delimited path ("early_commands/cmd1=a"). if '
'key starts with "json:" then val is loaded as '
- 'json (json:stages="[\'early\']")'),
+ 'json (json:stages=\'["early"]\')'),
'metavar': 'key=val', 'dest': 'cfgopts'}),
('source', {'help': 'what to install', 'nargs': '*'}),
)
diff --git a/curtin/commands/main.py b/curtin/commands/main.py
index df97b7d..5d68f15 100644
--- a/curtin/commands/main.py
+++ b/curtin/commands/main.py
@@ -65,7 +65,7 @@ def get_main_parser(stacktrace=False, verbosity=0,
help=('define a config variable. key can be a "/" '
'delimited path ("early_commands/cmd1=a"). if '
'key starts with "json:" then val is loaded as '
- 'json (json:stages="[\'early\']")'),
+ 'json (json:stages=\'["early"]\')'),
metavar='key=val', dest='main_cfgopts')
parser.set_defaults(config={})
parser.set_defaults(reportstack=None)
Follow ups
-
[Merge] curtin:usage-json-double-quotes into curtin:master
From: Server Team CI bot, 2022-07-28
-
Re: [Merge] curtin:usage-json-double-quotes into curtin:master
From: Server Team CI bot, 2022-07-28
-
[Merge] curtin:usage-json-double-quotes into curtin:master
From: Michael Hudson-Doyle, 2022-07-28
-
[Merge] curtin:usage-json-double-quotes into curtin:master
From: Michael Hudson-Doyle, 2022-07-28
-
Invalid Commit Message
From: Server Team CI bot, 2022-07-28
-
[Merge] curtin:usage-json-double-quotes into curtin:master
From: Server Team CI bot, 2022-07-28
-
Re: [Merge] curtin:usage-json-double-quotes into curtin:master
From: Server Team CI bot, 2022-07-28
-
[Merge] curtin:usage-json-double-quotes into curtin:master
From: Michael Hudson-Doyle, 2022-07-28
-
Re: [Merge] curtin:usage-json-double-quotes into curtin:master
From: Michael Hudson-Doyle, 2022-07-27
-
[Merge] curtin:usage-json-double-quotes into curtin:master
From: Michael Hudson-Doyle, 2022-07-27
-
Re: [Merge] curtin:usage-json-double-quotes into curtin:master
From: Server Team CI bot, 2022-07-27
-
Re: [Merge] curtin:usage-json-double-quotes into curtin:master
From: Server Team CI bot, 2022-07-27
-
Re: [Merge] curtin:usage-json-double-quotes into curtin:master
From: Server Team CI bot, 2022-07-27
-
Re: [Merge] curtin:usage-json-double-quotes into curtin:master
From: Server Team CI bot, 2022-07-27
-
Re: [Merge] curtin:usage-json-double-quotes into curtin:master
From: Server Team CI bot, 2022-07-27
-
Re: [Merge] curtin:usage-json-double-quotes into curtin:master
From: Server Team CI bot, 2022-07-27
-
Re: [Merge] curtin:usage-json-double-quotes into curtin:master
From: Server Team CI bot, 2022-07-27
-
Re: [Merge] curtin:usage-json-double-quotes into curtin:master
From: Michael Hudson-Doyle, 2022-07-27
-
[Merge] curtin:usage-json-double-quotes into curtin:master
From: Michael Hudson-Doyle, 2022-07-27
-
Re: [Merge] curtin:usage-json-double-quotes into curtin:master
From: Server Team CI bot, 2022-07-20