diff --git a/.github/workflows/_ci.yml b/.github/workflows/_ci.yml index cb534c4..2a18f6c 100644 --- a/.github/workflows/_ci.yml +++ b/.github/workflows/_ci.yml @@ -17,8 +17,7 @@ jobs: - run: npm ci - run: npm run format:check - run: npm run lint - # FIXME: Re-enable this once tests can reliably run in GitHub Actions - # - run: npm run test + - run: npm run test - run: npm run build - name: Check that dist/ is correctly generated diff --git a/.node-version b/.node-version index 1cc433a..2062ac7 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -20.6.0 +22.7.0 diff --git a/dist/build-crates-debian-main.js b/dist/build-crates-debian-main.js index dd87c08..4948034 100644 --- a/dist/build-crates-debian-main.js +++ b/dist/build-crates-debian-main.js @@ -127477,8 +127477,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) { * The executable is cached using GitHub's `@actions/cache`. * @param name Name of the cargo binary on crates.io */ -async function installBinaryCached(name) { - if (process.env["GITHUB_ACTIONS"] != undefined) { +async function installBinaryCached(name, useCache) { + if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) { const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")]; const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name]; const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`; @@ -127616,6 +127616,7 @@ function exec(program, args, options) { options.cwd = options.cwd != null ? options.cwd : "."; options.check = options.check != null ? options.check : true; options.input = options.input != null ? options.input : ""; + options.quiet = options.quiet != null ? options.quiet : false; _actions_core__WEBPACK_IMPORTED_MODULE_1__.startGroup(`\u001b[1m\u001b[35m${program}(${args.join(", ")})\u001b[0m`); const returns = (0,child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync)(program, args, { // NOTE: Environment variables defined in `options.env` take precedence over @@ -127632,11 +127633,11 @@ function exec(program, args, options) { input: options.input, maxBuffer: MAX_BUFFER, }); - if (returns.stdout != "") { + if (returns.stdout != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstdout:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stdout); } - if (returns.stderr != "") { + if (returns.stderr != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstderr:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stderr); } @@ -127696,12 +127697,12 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw class TOML { static async init() { - await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2"); + await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false); return new TOML(); } get(path, key) { const query = key == undefined ? "." : key.join("."); - return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query])); + return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query], { quiet: true })); } async set(path, key, value) { const query = key.join("."); diff --git a/dist/build-crates-standalone-main.js b/dist/build-crates-standalone-main.js index ce5a67c..3ecc45b 100644 --- a/dist/build-crates-standalone-main.js +++ b/dist/build-crates-standalone-main.js @@ -127461,8 +127461,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) { * The executable is cached using GitHub's `@actions/cache`. * @param name Name of the cargo binary on crates.io */ -async function installBinaryCached(name) { - if (process.env["GITHUB_ACTIONS"] != undefined) { +async function installBinaryCached(name, useCache) { + if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) { const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")]; const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name]; const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`; @@ -127600,6 +127600,7 @@ function exec(program, args, options) { options.cwd = options.cwd != null ? options.cwd : "."; options.check = options.check != null ? options.check : true; options.input = options.input != null ? options.input : ""; + options.quiet = options.quiet != null ? options.quiet : false; _actions_core__WEBPACK_IMPORTED_MODULE_1__.startGroup(`\u001b[1m\u001b[35m${program}(${args.join(", ")})\u001b[0m`); const returns = (0,child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync)(program, args, { // NOTE: Environment variables defined in `options.env` take precedence over @@ -127616,11 +127617,11 @@ function exec(program, args, options) { input: options.input, maxBuffer: MAX_BUFFER, }); - if (returns.stdout != "") { + if (returns.stdout != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstdout:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stdout); } - if (returns.stderr != "") { + if (returns.stderr != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstderr:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stderr); } @@ -127709,12 +127710,12 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw class TOML { static async init() { - await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2"); + await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false); return new TOML(); } get(path, key) { const query = key == undefined ? "." : key.join("."); - return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query])); + return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query], { quiet: true })); } async set(path, key, value) { const query = key.join("."); diff --git a/dist/bump-crates-main.js b/dist/bump-crates-main.js index 118c532..b787705 100644 --- a/dist/bump-crates-main.js +++ b/dist/bump-crates-main.js @@ -81183,8 +81183,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) { * The executable is cached using GitHub's `@actions/cache`. * @param name Name of the cargo binary on crates.io */ -async function installBinaryCached(name) { - if (process.env["GITHUB_ACTIONS"] != undefined) { +async function installBinaryCached(name, useCache) { + if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) { const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")]; const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name]; const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`; @@ -81322,6 +81322,7 @@ function exec(program, args, options) { options.cwd = options.cwd != null ? options.cwd : "."; options.check = options.check != null ? options.check : true; options.input = options.input != null ? options.input : ""; + options.quiet = options.quiet != null ? options.quiet : false; _actions_core__WEBPACK_IMPORTED_MODULE_1__.startGroup(`\u001b[1m\u001b[35m${program}(${args.join(", ")})\u001b[0m`); const returns = (0,child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync)(program, args, { // NOTE: Environment variables defined in `options.env` take precedence over @@ -81338,11 +81339,11 @@ function exec(program, args, options) { input: options.input, maxBuffer: MAX_BUFFER, }); - if (returns.stdout != "") { + if (returns.stdout != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstdout:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stdout); } - if (returns.stderr != "") { + if (returns.stderr != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstderr:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stderr); } @@ -81401,12 +81402,12 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw class TOML { static async init() { - await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2"); + await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false); return new TOML(); } get(path, key) { const query = key == undefined ? "." : key.join("."); - return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query])); + return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query], { quiet: true })); } async set(path, key, value) { const query = key.join("."); diff --git a/dist/create-release-branch-main.js b/dist/create-release-branch-main.js index dd633f4..c6ab112 100644 --- a/dist/create-release-branch-main.js +++ b/dist/create-release-branch-main.js @@ -24785,6 +24785,7 @@ function exec(program, args, options) { options.cwd = options.cwd != null ? options.cwd : "."; options.check = options.check != null ? options.check : true; options.input = options.input != null ? options.input : ""; + options.quiet = options.quiet != null ? options.quiet : false; core.startGroup(`\u001b[1m\u001b[35m${program}(${args.join(", ")})\u001b[0m`); const returns = spawnSync(program, args, { // NOTE: Environment variables defined in `options.env` take precedence over @@ -24801,11 +24802,11 @@ function exec(program, args, options) { input: options.input, maxBuffer: MAX_BUFFER, }); - if (returns.stdout != "") { + if (returns.stdout != "" && !options.quiet) { core.info(`\u001b[1mstdout:\u001b[0m`); core.info(returns.stdout); } - if (returns.stderr != "") { + if (returns.stderr != "" && !options.quiet) { core.info(`\u001b[1mstderr:\u001b[0m`); core.info(returns.stderr); } diff --git a/dist/publish-crates-cargo-main.js b/dist/publish-crates-cargo-main.js index 5d05b79..dfd554b 100644 --- a/dist/publish-crates-cargo-main.js +++ b/dist/publish-crates-cargo-main.js @@ -81072,8 +81072,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) { * The executable is cached using GitHub's `@actions/cache`. * @param name Name of the cargo binary on crates.io */ -async function installBinaryCached(name) { - if (process.env["GITHUB_ACTIONS"] != undefined) { +async function installBinaryCached(name, useCache) { + if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) { const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")]; const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name]; const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`; @@ -81211,6 +81211,7 @@ function exec(program, args, options) { options.cwd = options.cwd != null ? options.cwd : "."; options.check = options.check != null ? options.check : true; options.input = options.input != null ? options.input : ""; + options.quiet = options.quiet != null ? options.quiet : false; _actions_core__WEBPACK_IMPORTED_MODULE_1__.startGroup(`\u001b[1m\u001b[35m${program}(${args.join(", ")})\u001b[0m`); const returns = (0,child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync)(program, args, { // NOTE: Environment variables defined in `options.env` take precedence over @@ -81227,11 +81228,11 @@ function exec(program, args, options) { input: options.input, maxBuffer: MAX_BUFFER, }); - if (returns.stdout != "") { + if (returns.stdout != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstdout:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stdout); } - if (returns.stderr != "") { + if (returns.stderr != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstderr:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stderr); } @@ -81511,12 +81512,12 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw class TOML { static async init() { - await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2"); + await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false); return new TOML(); } get(path, key) { const query = key == undefined ? "." : key.join("."); - return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query])); + return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query], { quiet: true })); } async set(path, key, value) { const query = key.join("."); diff --git a/dist/publish-crates-debian-main.js b/dist/publish-crates-debian-main.js index 0f3a70d..2081228 100644 --- a/dist/publish-crates-debian-main.js +++ b/dist/publish-crates-debian-main.js @@ -127456,8 +127456,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) { * The executable is cached using GitHub's `@actions/cache`. * @param name Name of the cargo binary on crates.io */ -async function installBinaryCached(name) { - if (process.env["GITHUB_ACTIONS"] != undefined) { +async function installBinaryCached(name, useCache) { + if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) { const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")]; const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name]; const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`; @@ -127595,6 +127595,7 @@ function exec(program, args, options) { options.cwd = options.cwd != null ? options.cwd : "."; options.check = options.check != null ? options.check : true; options.input = options.input != null ? options.input : ""; + options.quiet = options.quiet != null ? options.quiet : false; _actions_core__WEBPACK_IMPORTED_MODULE_1__.startGroup(`\u001b[1m\u001b[35m${program}(${args.join(", ")})\u001b[0m`); const returns = (0,child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync)(program, args, { // NOTE: Environment variables defined in `options.env` take precedence over @@ -127611,11 +127612,11 @@ function exec(program, args, options) { input: options.input, maxBuffer: MAX_BUFFER, }); - if (returns.stdout != "") { + if (returns.stdout != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstdout:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stdout); } - if (returns.stderr != "") { + if (returns.stderr != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstderr:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stderr); } @@ -127849,12 +127850,12 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw class TOML { static async init() { - await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2"); + await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false); return new TOML(); } get(path, key) { const query = key == undefined ? "." : key.join("."); - return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query])); + return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query], { quiet: true })); } async set(path, key, value) { const query = key.join("."); diff --git a/dist/publish-crates-eclipse-main.js b/dist/publish-crates-eclipse-main.js index 9f5fdf2..32f2349 100644 --- a/dist/publish-crates-eclipse-main.js +++ b/dist/publish-crates-eclipse-main.js @@ -127537,8 +127537,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) { * The executable is cached using GitHub's `@actions/cache`. * @param name Name of the cargo binary on crates.io */ -async function installBinaryCached(name) { - if (process.env["GITHUB_ACTIONS"] != undefined) { +async function installBinaryCached(name, useCache) { + if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) { const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")]; const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name]; const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`; @@ -127697,6 +127697,7 @@ function exec(program, args, options) { options.cwd = options.cwd != null ? options.cwd : "."; options.check = options.check != null ? options.check : true; options.input = options.input != null ? options.input : ""; + options.quiet = options.quiet != null ? options.quiet : false; _actions_core__WEBPACK_IMPORTED_MODULE_1__.startGroup(`\u001b[1m\u001b[35m${program}(${args.join(", ")})\u001b[0m`); const returns = (0,child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync)(program, args, { // NOTE: Environment variables defined in `options.env` take precedence over @@ -127713,11 +127714,11 @@ function exec(program, args, options) { input: options.input, maxBuffer: MAX_BUFFER, }); - if (returns.stdout != "") { + if (returns.stdout != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstdout:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stdout); } - if (returns.stderr != "") { + if (returns.stderr != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstderr:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stderr); } @@ -127955,12 +127956,12 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw class TOML { static async init() { - await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2"); + await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false); return new TOML(); } get(path, key) { const query = key == undefined ? "." : key.join("."); - return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query])); + return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query], { quiet: true })); } async set(path, key, value) { const query = key.join("."); diff --git a/dist/publish-crates-github-main.js b/dist/publish-crates-github-main.js index 5b10d96..3b91a66 100644 --- a/dist/publish-crates-github-main.js +++ b/dist/publish-crates-github-main.js @@ -127537,8 +127537,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) { * The executable is cached using GitHub's `@actions/cache`. * @param name Name of the cargo binary on crates.io */ -async function installBinaryCached(name) { - if (process.env["GITHUB_ACTIONS"] != undefined) { +async function installBinaryCached(name, useCache) { + if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) { const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")]; const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name]; const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`; @@ -127676,6 +127676,7 @@ function exec(program, args, options) { options.cwd = options.cwd != null ? options.cwd : "."; options.check = options.check != null ? options.check : true; options.input = options.input != null ? options.input : ""; + options.quiet = options.quiet != null ? options.quiet : false; _actions_core__WEBPACK_IMPORTED_MODULE_1__.startGroup(`\u001b[1m\u001b[35m${program}(${args.join(", ")})\u001b[0m`); const returns = (0,child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync)(program, args, { // NOTE: Environment variables defined in `options.env` take precedence over @@ -127692,11 +127693,11 @@ function exec(program, args, options) { input: options.input, maxBuffer: MAX_BUFFER, }); - if (returns.stdout != "") { + if (returns.stdout != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstdout:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stdout); } - if (returns.stderr != "") { + if (returns.stderr != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstderr:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stderr); } @@ -127895,12 +127896,12 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw class TOML { static async init() { - await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2"); + await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false); return new TOML(); } get(path, key) { const query = key == undefined ? "." : key.join("."); - return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query])); + return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query], { quiet: true })); } async set(path, key, value) { const query = key.join("."); diff --git a/dist/publish-crates-homebrew-main.js b/dist/publish-crates-homebrew-main.js index f8c686f..a58c498 100644 --- a/dist/publish-crates-homebrew-main.js +++ b/dist/publish-crates-homebrew-main.js @@ -127441,8 +127441,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) { * The executable is cached using GitHub's `@actions/cache`. * @param name Name of the cargo binary on crates.io */ -async function installBinaryCached(name) { - if (process.env["GITHUB_ACTIONS"] != undefined) { +async function installBinaryCached(name, useCache) { + if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) { const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")]; const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name]; const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`; @@ -127601,6 +127601,7 @@ function exec(program, args, options) { options.cwd = options.cwd != null ? options.cwd : "."; options.check = options.check != null ? options.check : true; options.input = options.input != null ? options.input : ""; + options.quiet = options.quiet != null ? options.quiet : false; _actions_core__WEBPACK_IMPORTED_MODULE_1__.startGroup(`\u001b[1m\u001b[35m${program}(${args.join(", ")})\u001b[0m`); const returns = (0,child_process__WEBPACK_IMPORTED_MODULE_0__.spawnSync)(program, args, { // NOTE: Environment variables defined in `options.env` take precedence over @@ -127617,11 +127618,11 @@ function exec(program, args, options) { input: options.input, maxBuffer: MAX_BUFFER, }); - if (returns.stdout != "") { + if (returns.stdout != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstdout:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stdout); } - if (returns.stderr != "") { + if (returns.stderr != "" && !options.quiet) { _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(`\u001b[1mstderr:\u001b[0m`); _actions_core__WEBPACK_IMPORTED_MODULE_1__.info(returns.stderr); } @@ -127885,12 +127886,12 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw class TOML { static async init() { - await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2"); + await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false); return new TOML(); } get(path, key) { const query = key == undefined ? "." : key.join("."); - return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query])); + return JSON.parse((0,_command__WEBPACK_IMPORTED_MODULE_1__/* .exec */ .G)("toml", ["get", path, query], { quiet: true })); } async set(path, key, value) { const query = key.join("."); diff --git a/package.json b/package.json index 6312471..7642706 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "lint": "npx eslint . -c .eslintrc.json", "build": "./build.js", "build:watch": "npm run package -- --watch", - "test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --detectOpenHandles", + "test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --debug --no-watchman", "all": "npm run format:write && npm run lint && npm run test && npm run build", "clean": "rm dist/*" }, @@ -36,4 +36,4 @@ "ts-jest": "^29.1.2", "typescript": "^5.3.3" } -} +} \ No newline at end of file diff --git a/src/cargo.ts b/src/cargo.ts index 53aa4ae..65163ee 100644 --- a/src/cargo.ts +++ b/src/cargo.ts @@ -291,8 +291,8 @@ export function installBinaryFromGit(name: string, gitUrl: string, gitBranch: st * The executable is cached using GitHub's `@actions/cache`. * @param name Name of the cargo binary on crates.io */ -export async function installBinaryCached(name: string) { - if (process.env["GITHUB_ACTIONS"] != undefined) { +export async function installBinaryCached(name: string, useCache?: boolean) { + if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) { const paths = [join(os.homedir(), ".cargo", "bin")]; const version = config.lock.cratesio[name]; const key = `${os.platform()}-${os.release()}-${os.arch()}-${name}-${version}`; diff --git a/src/command.ts b/src/command.ts index c03cd0f..a7e7bbb 100644 --- a/src/command.ts +++ b/src/command.ts @@ -61,6 +61,7 @@ export function exec(program: string, args: string[], options?: CommandOptions): options.cwd = options.cwd != null ? options.cwd : "."; options.check = options.check != null ? options.check : true; options.input = options.input != null ? options.input : ""; + options.quiet = options.quiet != null ? options.quiet : false; core.startGroup(`\u001b[1m\u001b[35m${program}(${args.join(", ")})\u001b[0m`); @@ -80,12 +81,12 @@ export function exec(program: string, args: string[], options?: CommandOptions): maxBuffer: MAX_BUFFER, }); - if (returns.stdout != "") { + if (returns.stdout != "" && !options.quiet) { core.info(`\u001b[1mstdout:\u001b[0m`); core.info(returns.stdout); } - if (returns.stderr != "") { + if (returns.stderr != "" && !options.quiet) { core.info(`\u001b[1mstderr:\u001b[0m`); core.info(returns.stderr); } diff --git a/src/toml.ts b/src/toml.ts index 7078e01..80eb686 100644 --- a/src/toml.ts +++ b/src/toml.ts @@ -5,13 +5,13 @@ import * as cargo from "./cargo"; export class TOML { static async init(): Promise { - await cargo.installBinaryCached("toml-cli2"); + await cargo.installBinaryCached("toml-cli2", false); return new TOML(); } get(path: string, key?: string[]): Record { const query = key == undefined ? "." : key.join("."); - return JSON.parse(exec("toml", ["get", path, query])) as Record; + return JSON.parse(exec("toml", ["get", path, query], { quiet: true })) as Record; } async set(path: string, key: string[], value: string) {