occam-open-cli 6.0.159 → 6.0.160

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,8 @@
2
2
 
3
3
  const { shellUtilities } = require("necessary");
4
4
 
5
- const { validateGitHubHostName } = require("../../utilities/validate"),
6
- { EMPTY_STRING } = require("../../constants"),
5
+ const { EMPTY_STRING } = require("../../constants"),
6
+ { validateGitHubHostName } = require("../../utilities/validate"),
7
7
  { DEFAULT_GITHUB_HOST_NAME } = require("../../defaults"),
8
8
  { GITHUB_HOST_NAME_DESCRIPTION } = require("../../descriptions"),
9
9
  { INVALID_GITHUB_HOST_NAME_MESSAGE } = require("../../messages");
@@ -11,9 +11,9 @@ const { prompt } = shellUtilities;
11
11
 
12
12
  function setShellCommandsPromptOperation(proceed, abort, context) {
13
13
  const { shellCommands } = context,
14
+ description = SHELL_COMMANDS_DESCRIPTION,
14
15
  initialAnswer = shellCommands, ///
15
16
  validationFunction = validateShellCommands, ///
16
- description = SHELL_COMMANDS_DESCRIPTION,
17
17
  options = {
18
18
  description,
19
19
  initialAnswer,
@@ -21,13 +21,25 @@ function setShellCommandsPromptOperation(proceed, abort, context) {
21
21
  };
22
22
 
23
23
  prompt(options, (answer) => {
24
- const shellCommands = answer; ///
24
+ let shellCommands = answer; ///
25
+
26
+ const valid = (shellCommands !== null);
27
+
28
+ if (valid) {
29
+ if (shellCommands === EMPTY_STRING) {
30
+ shellCommands = DEFAULT_SHELL_COMMANDS;
31
+ }
32
+
33
+ Object.assign(context, {
34
+ shellCommands
35
+ });
36
+
37
+ proceed();
25
38
 
26
- Object.assign(context, {
27
- shellCommands
28
- });
39
+ return;
40
+ }
29
41
 
30
- proceed();
42
+ abort();
31
43
  });
32
44
  }
33
45
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "occam-open-cli",
3
3
  "author": "James Smith",
4
- "version": "6.0.159",
4
+ "version": "6.0.160",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/occam-open-cli",
7
7
  "description": "Occam's command line package management tool.",