@mikeyt23/node-cli-utils 1.2.3 → 1.2.4

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/index.js +5 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -160,7 +160,7 @@ exports.defaultSpawnOptions = {
160
160
  stdio: ['ignore', 'inherit', 'inherit']
161
161
  }
162
162
 
163
- async function createTarball(directoryToTarball, outputDirectory, tarballName, strip = 0) {
163
+ async function createTarball(directoryToTarball, outputDirectory, tarballName, cwd = '') {
164
164
  if (!directoryToTarball || directoryToTarball.length === 0) {
165
165
  throw new Error('directoryToTarball is required')
166
166
  }
@@ -188,7 +188,10 @@ async function createTarball(directoryToTarball, outputDirectory, tarballName, s
188
188
  }
189
189
  }
190
190
 
191
- let options = { gzip: true, file: tarballPath, strip: strip }
191
+ let options = { gzip: true, file: tarballPath }
192
+ if (!!cwd) {
193
+ options.cwd = cwd
194
+ }
192
195
 
193
196
  await tar.c(options, [directoryToTarball])
194
197
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikeyt23/node-cli-utils",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "Some node cli utility functions",
5
5
  "author": "Mike Thompson",
6
6
  "license": "MIT",