@oclif/plugin-update 4.7.44 → 4.7.45

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.
package/README.md CHANGED
@@ -81,7 +81,7 @@ EXAMPLES
81
81
  $ oclif-example update --available
82
82
  ```
83
83
 
84
- _See code: [src/commands/update.ts](https://github.com/oclif/plugin-update/blob/4.7.44/src/commands/update.ts)_
84
+ _See code: [src/commands/update.ts](https://github.com/oclif/plugin-update/blob/4.7.45/src/commands/update.ts)_
85
85
  <!-- commandsstop -->
86
86
 
87
87
  # Contributing
package/dist/update.js CHANGED
@@ -144,8 +144,12 @@ get_script_dir () {
144
144
  DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
145
145
  echo "$DIR"
146
146
  }
147
- DIR=$(get_script_dir)
148
- ${binPathEnvVar}="\$DIR/${bin}" ${redirectedEnvVar}=1 "$DIR/../${version}/bin/${bin}" "$@"
147
+
148
+ # Ensure everything is read at once before execution to avoid race conditions when updating versions
149
+ {
150
+ DIR=$(get_script_dir)
151
+ ${binPathEnvVar}="\$DIR/${bin}" ${redirectedEnvVar}=1 "$DIR/../${version}/bin/${bin}" "$@"
152
+ }; exit
149
153
  `;
150
154
  /* eslint-enable no-useless-escape */
151
155
  await writeFile(dst, body, { mode: 0o755 });
@@ -106,5 +106,5 @@
106
106
  ]
107
107
  }
108
108
  },
109
- "version": "4.7.44"
109
+ "version": "4.7.45"
110
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oclif/plugin-update",
3
- "version": "4.7.44",
3
+ "version": "4.7.45",
4
4
  "author": "Salesforce",
5
5
  "bugs": "https://github.com/oclif/plugin-update/issues",
6
6
  "dependencies": {