mirror of https://github.com/aminya/setup-cpp
fix: use patha only when needed
This commit is contained in:
parent
ae014dcdc3
commit
3e4a96d3c7
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,7 +1,7 @@
|
||||||
|
import { dirname } from "path"
|
||||||
import { addPath } from "envosman"
|
import { addPath } from "envosman"
|
||||||
import { execaSync } from "execa"
|
import { execaSync } from "execa"
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
import { dirname } from "patha"
|
|
||||||
import which from "which"
|
import which from "which"
|
||||||
import { rcOptions } from "../cli-options.js"
|
import { rcOptions } from "../cli-options.js"
|
||||||
import type { InstallationInfo } from "../utils/setup/setupBin.js"
|
import type { InstallationInfo } from "../utils/setup/setupBin.js"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
import { join } from "path"
|
||||||
import { info, notice } from "ci-log"
|
import { info, notice } from "ci-log"
|
||||||
import { addPath } from "envosman"
|
import { addPath } from "envosman"
|
||||||
import { addExeExt, join } from "patha"
|
import { addExeExt } from "patha"
|
||||||
import { installAptPack } from "setup-apt"
|
import { installAptPack } from "setup-apt"
|
||||||
import { installBrewPack } from "setup-brew"
|
import { installBrewPack } from "setup-brew"
|
||||||
import { setupGraphviz } from "../graphviz/graphviz.js"
|
import { setupGraphviz } from "../graphviz/graphviz.js"
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import path from "path"
|
import path, { join } from "path"
|
||||||
import { fileURLToPath } from "url"
|
import { fileURLToPath } from "url"
|
||||||
import { execaSync } from "execa"
|
import { execaSync } from "execa"
|
||||||
import { chmod } from "fs/promises"
|
import { chmod } from "fs/promises"
|
||||||
import { addExeExt, join } from "patha"
|
import { addExeExt } from "patha"
|
||||||
import { isUbuntu } from "../../utils/env/isUbuntu.js"
|
import { isUbuntu } from "../../utils/env/isUbuntu.js"
|
||||||
import { ubuntuVersion } from "../../utils/env/ubuntu_version.js"
|
import { ubuntuVersion } from "../../utils/env/ubuntu_version.js"
|
||||||
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"
|
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import path from "path"
|
import path, { join } from "path"
|
||||||
import { fileURLToPath } from "url"
|
import { fileURLToPath } from "url"
|
||||||
import { GITHUB_ACTIONS } from "ci-info"
|
import { GITHUB_ACTIONS } from "ci-info"
|
||||||
import { error, info, warning } from "ci-log"
|
import { error, info, warning } from "ci-log"
|
||||||
|
@ -6,7 +6,7 @@ import { addEnv, addPath } from "envosman"
|
||||||
import { type ExecaReturnValue, execa } from "execa"
|
import { type ExecaReturnValue, execa } from "execa"
|
||||||
import { readdir } from "fs/promises"
|
import { readdir } from "fs/promises"
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
import { addExeExt, join } from "patha"
|
import { addExeExt } from "patha"
|
||||||
import semverCoerce from "semver/functions/coerce"
|
import semverCoerce from "semver/functions/coerce"
|
||||||
import semverMajor from "semver/functions/major"
|
import semverMajor from "semver/functions/major"
|
||||||
import { addUpdateAlternativesToRc, installAptPack } from "setup-apt"
|
import { addUpdateAlternativesToRc, installAptPack } from "setup-apt"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
import { join } from "path"
|
||||||
import { endGroup, startGroup } from "@actions/core"
|
import { endGroup, startGroup } from "@actions/core"
|
||||||
import { error } from "ci-log"
|
import { error } from "ci-log"
|
||||||
import pTimeout from "p-timeout"
|
import pTimeout from "p-timeout"
|
||||||
import { join } from "patha"
|
|
||||||
import { setupBrew } from "setup-brew"
|
import { setupBrew } from "setup-brew"
|
||||||
import { getSuccessMessage, rcOptions } from "./cli-options.js"
|
import { getSuccessMessage, rcOptions } from "./cli-options.js"
|
||||||
import { type ToolName, setups } from "./tool.js"
|
import { type ToolName, setups } from "./tool.js"
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import path from "path"
|
import path, { join } from "path"
|
||||||
import { fileURLToPath } from "url"
|
import { fileURLToPath } from "url"
|
||||||
import { info } from "ci-log"
|
import { info } from "ci-log"
|
||||||
import { execa } from "execa"
|
import { execa } from "execa"
|
||||||
import { addExeExt, join } from "patha"
|
import { addExeExt } from "patha"
|
||||||
import { installAptPack } from "setup-apt"
|
import { installAptPack } from "setup-apt"
|
||||||
import { untildifyUser } from "untildify-user"
|
import { untildifyUser } from "untildify-user"
|
||||||
import which from "which"
|
import which from "which"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import path from "path"
|
import path, { join } from "path"
|
||||||
import { fileURLToPath } from "url"
|
import { fileURLToPath } from "url"
|
||||||
import * as io from "@actions/io"
|
import * as io from "@actions/io"
|
||||||
import { execaSync } from "execa"
|
import { execaSync } from "execa"
|
||||||
import { chmod } from "fs/promises"
|
import { chmod } from "fs/promises"
|
||||||
import { isUrlOnline } from "is-url-online"
|
import { isUrlOnline } from "is-url-online"
|
||||||
import { addExeExt, join } from "patha"
|
import { addExeExt } from "patha"
|
||||||
import { ubuntuVersion } from "../../utils/env/ubuntu_version.js"
|
import { ubuntuVersion } from "../../utils/env/ubuntu_version.js"
|
||||||
import { getSpecificVersionAndUrl } from "../../utils/setup/version.js"
|
import { getSpecificVersionAndUrl } from "../../utils/setup/version.js"
|
||||||
import { setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"
|
import { setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import path, { delimiter } from "path"
|
import path, { delimiter, join } from "path"
|
||||||
import { fileURLToPath } from "url"
|
import { fileURLToPath } from "url"
|
||||||
import { GITHUB_ACTIONS } from "ci-info"
|
import { GITHUB_ACTIONS } from "ci-info"
|
||||||
import { info, warning } from "ci-log"
|
import { info, warning } from "ci-log"
|
||||||
import { addEnv } from "envosman"
|
import { addEnv } from "envosman"
|
||||||
import memoize from "memoizee"
|
import memoize from "memoizee"
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
import { addExeExt, join } from "patha"
|
import { addExeExt } from "patha"
|
||||||
import { addUpdateAlternativesToRc, installAptPack } from "setup-apt"
|
import { addUpdateAlternativesToRc, installAptPack } from "setup-apt"
|
||||||
import { rcOptions } from "../cli-options.js"
|
import { rcOptions } from "../cli-options.js"
|
||||||
import { setupGcc } from "../gcc/gcc.js"
|
import { setupGcc } from "../gcc/gcc.js"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import path from "path"
|
import path, { join } from "path"
|
||||||
import { fileURLToPath } from "url"
|
import { fileURLToPath } from "url"
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
@ -6,7 +6,6 @@ import { GITHUB_ACTIONS } from "ci-info"
|
||||||
import { error, info, warning } from "ci-log"
|
import { error, info, warning } from "ci-log"
|
||||||
import { findVcvarsall, vsversion_to_versionnumber } from "msvc-dev-cmd/lib.js"
|
import { findVcvarsall, vsversion_to_versionnumber } from "msvc-dev-cmd/lib.js"
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
import { join } from "patha"
|
|
||||||
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
|
||||||
import { setupVCVarsall } from "../vcvarsall/vcvarsall.js"
|
import { setupVCVarsall } from "../vcvarsall/vcvarsall.js"
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { tmpdir } from "os"
|
import { tmpdir } from "os"
|
||||||
|
import { dirname, join } from "path"
|
||||||
import { execRootSync } from "admina"
|
import { execRootSync } from "admina"
|
||||||
import { error, info } from "ci-log"
|
import { error, info } from "ci-log"
|
||||||
import { readFile, writeFile } from "fs/promises"
|
import { readFile, writeFile } from "fs/promises"
|
||||||
import { DownloaderHelper } from "node-downloader-helper"
|
import { DownloaderHelper } from "node-downloader-helper"
|
||||||
import { dirname, join } from "patha"
|
|
||||||
import { hasNala, installAptPack, qualifiedNeededAptPackage } from "setup-apt"
|
import { hasNala, installAptPack, qualifiedNeededAptPackage } from "setup-apt"
|
||||||
import which from "which"
|
import which from "which"
|
||||||
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
import { isUbuntu } from "../utils/env/isUbuntu.js"
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
import path from "path"
|
import path, { join } from "path"
|
||||||
import { fileURLToPath } from "url"
|
import { fileURLToPath } from "url"
|
||||||
import { debug } from "@actions/core"
|
import { debug } from "@actions/core"
|
||||||
import { GITHUB_ACTIONS } from "ci-info"
|
import { GITHUB_ACTIONS } from "ci-info"
|
||||||
import { info, warning } from "ci-log"
|
import { info, warning } from "ci-log"
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
import { join } from "patha"
|
|
||||||
import { findPyPyVersion } from "setup-python/src/find-pypy.js"
|
import { findPyPyVersion } from "setup-python/src/find-pypy.js"
|
||||||
import { useCpythonVersion } from "setup-python/src/find-python.js"
|
import { useCpythonVersion } from "setup-python/src/find-python.js"
|
||||||
import { IS_MAC } from "setup-python/src/utils.js"
|
import { IS_MAC } from "setup-python/src/utils.js"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import assert from "assert"
|
import assert from "assert"
|
||||||
import { homedir } from "os"
|
import { homedir } from "os"
|
||||||
import { parse as pathParse } from "path"
|
import { dirname, join, parse as pathParse } from "path"
|
||||||
import { getExecOutput } from "@actions/exec"
|
import { getExecOutput } from "@actions/exec"
|
||||||
import { GITHUB_ACTIONS } from "ci-info"
|
import { GITHUB_ACTIONS } from "ci-info"
|
||||||
import { info, warning } from "ci-log"
|
import { info, warning } from "ci-log"
|
||||||
|
@ -9,7 +9,7 @@ import { execa } from "execa"
|
||||||
import { readdir } from "fs/promises"
|
import { readdir } from "fs/promises"
|
||||||
import memoize from "memoizee"
|
import memoize from "memoizee"
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
import { addExeExt, dirname, join } from "patha"
|
import { addExeExt } from "patha"
|
||||||
import { installAptPack } from "setup-apt"
|
import { installAptPack } from "setup-apt"
|
||||||
import { installBrewPack } from "setup-brew"
|
import { installBrewPack } from "setup-brew"
|
||||||
import which from "which"
|
import which from "which"
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
import { tmpdir } from "os"
|
import { tmpdir } from "os"
|
||||||
import { basename } from "path"
|
import { basename, join } from "path"
|
||||||
import { cacheDir, downloadTool, find } from "@actions/tool-cache"
|
import { cacheDir, downloadTool, find } from "@actions/tool-cache"
|
||||||
import { GITHUB_ACTIONS } from "ci-info"
|
import { GITHUB_ACTIONS } from "ci-info"
|
||||||
import { info, warning } from "ci-log"
|
import { info, warning } from "ci-log"
|
||||||
import { addPath } from "envosman"
|
import { addPath } from "envosman"
|
||||||
import { chmod } from "fs/promises"
|
import { chmod } from "fs/promises"
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
import { join } from "patha"
|
|
||||||
import retry from "retry-as-promised"
|
import retry from "retry-as-promised"
|
||||||
import { maybeGetInput, rcOptions } from "../../cli-options.js"
|
import { maybeGetInput, rcOptions } from "../../cli-options.js"
|
||||||
import { getArchiveType, getExtractFunction } from "./extract.js"
|
import { getArchiveType, getExtractFunction } from "./extract.js"
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
|
import { dirname, join } from "path"
|
||||||
import { info } from "@actions/core"
|
import { info } from "@actions/core"
|
||||||
import { addPath } from "envosman"
|
import { addPath } from "envosman"
|
||||||
import { execa, execaSync } from "execa"
|
import { execa, execaSync } from "execa"
|
||||||
import memoize from "memoizee"
|
import memoize from "memoizee"
|
||||||
import { mkdirp } from "mkdirp"
|
import { mkdirp } from "mkdirp"
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
import { addExeExt, dirname, join } from "patha"
|
import { addExeExt } from "patha"
|
||||||
import { installAptPack } from "setup-apt"
|
import { installAptPack } from "setup-apt"
|
||||||
import { untildifyUser } from "untildify-user"
|
import { untildifyUser } from "untildify-user"
|
||||||
import which from "which"
|
import which from "which"
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import { tmpdir } from "os"
|
import { tmpdir } from "os"
|
||||||
|
import * as path from "path"
|
||||||
|
import { join } from "path"
|
||||||
import * as io from "@actions/io"
|
import * as io from "@actions/io"
|
||||||
import spawn from "cross-spawn"
|
import spawn from "cross-spawn"
|
||||||
import * as path from "patha"
|
import { addExeExt } from "patha"
|
||||||
import { addExeExt, join } from "patha"
|
|
||||||
|
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
|
import { dirname, join } from "path"
|
||||||
import { grantUserWriteAccess } from "admina"
|
import { grantUserWriteAccess } from "admina"
|
||||||
import { info, notice } from "ci-log"
|
import { info, notice } from "ci-log"
|
||||||
import { addPath } from "envosman"
|
import { addPath } from "envosman"
|
||||||
import { execaSync } from "execa"
|
import { execaSync } from "execa"
|
||||||
import { pathExists } from "path-exists"
|
import { pathExists } from "path-exists"
|
||||||
import { addShExt, addShRelativePrefix, dirname, join } from "patha"
|
import { addShExt, addShRelativePrefix } from "patha"
|
||||||
import { installAptPack } from "setup-apt"
|
import { installAptPack } from "setup-apt"
|
||||||
import which from "which"
|
import which from "which"
|
||||||
import { rcOptions } from "../cli-options.js"
|
import { rcOptions } from "../cli-options.js"
|
||||||
|
|
Loading…
Reference in New Issue