@emulsify/cli 2.1.0 → 2.1.1

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.
@@ -1,14 +1,15 @@
1
1
  import { execFile } from 'child_process';
2
- import { dirname } from 'path';
2
+ import { dirname, resolve as resolvePath } from 'path';
3
3
  export default async function executeScript(scriptPath) {
4
+ const resolvedScriptPath = resolvePath(scriptPath);
4
5
  return new Promise((resolve, reject) => {
5
- execFile(process.execPath, [scriptPath], {
6
- cwd: dirname(scriptPath),
6
+ execFile(process.execPath, [resolvedScriptPath], {
7
+ cwd: dirname(resolvedScriptPath),
7
8
  encoding: 'utf8',
8
9
  }, (error, stdout, stderr) => {
9
10
  if (error) {
10
11
  const output = stderr.trim() || error.message;
11
- return reject(new Error(`Unable to execute hook script "${scriptPath}": ${output}`));
12
+ return reject(new Error(`Unable to execute hook script "${resolvedScriptPath}": ${output}`));
12
13
  }
13
14
  resolve(stdout || stderr || '');
14
15
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@emulsify/cli",
3
3
  "productName": "Emulsify CLI",
4
- "version": "2.1.0",
4
+ "version": "2.1.1",
5
5
  "description": "Command line interface for Emulsify",
6
6
  "repository": "git@github.com:emulsify-ds/emulsify-cli.git",
7
7
  "author": "Patrick Coffey <patrickcoffey48@gmail.com>",