From e5e934649d59ef111208b46ad43c0604c2675ab4 Mon Sep 17 00:00:00 2001 From: Janina Wibker Date: Sun, 12 Jan 2025 15:40:50 +0100 Subject: [PATCH] fix `command:` version extraction not working properly spawnSync didn't have `{ shell: true }` set, thus the command wasn't being interpreted correctly. --- publish/package.json | 2 +- version-metadata/package.json | 2 +- version-metadata/src/utils.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/publish/package.json b/publish/package.json index a465326..98de35c 100644 --- a/publish/package.json +++ b/publish/package.json @@ -1,6 +1,6 @@ { "name": "publish", - "version": "1.0.17", + "version": "1.0.18", "description": "An action that decides if a new release should be published", "scripts": { "build": "tsup", diff --git a/version-metadata/package.json b/version-metadata/package.json index 0429d84..3d08403 100644 --- a/version-metadata/package.json +++ b/version-metadata/package.json @@ -1,6 +1,6 @@ { "name": "version-metadata", - "version": "1.0.17", + "version": "1.0.18", "description": "An action that checks wether your package.json version has been updated with a bit of additional metadata", "scripts": { "build": "tsup", diff --git a/version-metadata/src/utils.ts b/version-metadata/src/utils.ts index 05d216b..1155344 100644 --- a/version-metadata/src/utils.ts +++ b/version-metadata/src/utils.ts @@ -476,7 +476,8 @@ const parseVersionFromFileContentsCommand = ( ): { success: false; error: string } | { success: true; version: string } => { const child = spawnSync(command, [], { input: fileContent, - encoding: 'utf-8' + encoding: 'utf-8', + shell: true }) if (child.error) {