occam-open-cli 6.1.32 → 6.1.34

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.
Files changed (2) hide show
  1. package/bin/main.js +9 -2
  2. package/package.json +1 -1
package/bin/main.js CHANGED
@@ -14,7 +14,8 @@ const helpAction = require("./action/help"),
14
14
  resetPasswordAction = require("./action/resetPassword"),
15
15
  setShellCommandsAction = require("./action/setShellCommands");
16
16
 
17
- const { NO_ARGUMENT_GIVEN_MESSAGE, COMMAND_NOT_RECOGNISED_MESSAGE } = require("./messages"),
17
+ const { EMPTY_STRING } = require("./constants"),
18
+ { NO_ARGUMENT_GIVEN_MESSAGE, COMMAND_NOT_RECOGNISED_MESSAGE } = require("./messages"),
18
19
  { DEFAULT_YES, DEFAULT_TAIL, DEFAULT_FOLLOW, DEFAULT_DRY_RUN, DEFAULT_QUIETLY, DEFAULT_HEADLESS, DEFAULT_LOG_LEVEL, DEFAULT_DEPENDENCIES } = require("./defaults"),
19
20
  { HELP_COMMAND,
20
21
  OPEN_COMMAND,
@@ -87,7 +88,7 @@ function main(command, argument, options) {
87
88
  if (argument === null) {
88
89
  console.log(NO_ARGUMENT_GIVEN_MESSAGE);
89
90
  } else {
90
- const releaseName = argument; ///
91
+ const releaseName = stripTrailingSlash(argument);
91
92
 
92
93
  publishAction(releaseName, tail, follow, dryRun, logLevel);
93
94
  }
@@ -154,3 +155,9 @@ function main(command, argument, options) {
154
155
  }
155
156
 
156
157
  module.exports = main;
158
+
159
+ function stripTrailingSlash(string) {
160
+ string = string.replace(/\/$/, EMPTY_STRING);
161
+
162
+ return string;
163
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "occam-open-cli",
3
3
  "author": "James Smith",
4
- "version": "6.1.32",
4
+ "version": "6.1.34",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/occam-open-cli",
7
7
  "description": "Occam's package management tool.",