fix: use patha only when needed

This commit is contained in:
Amin Yahyaabadi 2024-09-04 01:49:14 -07:00
parent ae014dcdc3
commit 3e4a96d3c7
No known key found for this signature in database
GPG Key ID: F52AF77F636088F0
22 changed files with 33 additions and 32 deletions

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

View File

@ -1,7 +1,7 @@
import { dirname } from "path"
import { addPath } from "envosman"
import { execaSync } from "execa"
import { pathExists } from "path-exists"
import { dirname } from "patha"
import which from "which"
import { rcOptions } from "../cli-options.js"
import type { InstallationInfo } from "../utils/setup/setupBin.js"

View File

@ -1,6 +1,7 @@
import { join } from "path"
import { info, notice } from "ci-log"
import { addPath } from "envosman"
import { addExeExt, join } from "patha"
import { addExeExt } from "patha"
import { installAptPack } from "setup-apt"
import { installBrewPack } from "setup-brew"
import { setupGraphviz } from "../graphviz/graphviz.js"

View File

@ -1,8 +1,8 @@
import path from "path"
import path, { join } from "path"
import { fileURLToPath } from "url"
import { execaSync } from "execa"
import { chmod } from "fs/promises"
import { addExeExt, join } from "patha"
import { addExeExt } from "patha"
import { isUbuntu } from "../../utils/env/isUbuntu.js"
import { ubuntuVersion } from "../../utils/env/ubuntu_version.js"
import { cleanupTmpDir, setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"

View File

@ -1,4 +1,4 @@
import path from "path"
import path, { join } from "path"
import { fileURLToPath } from "url"
import { GITHUB_ACTIONS } from "ci-info"
import { error, info, warning } from "ci-log"
@ -6,7 +6,7 @@ import { addEnv, addPath } from "envosman"
import { type ExecaReturnValue, execa } from "execa"
import { readdir } from "fs/promises"
import { pathExists } from "path-exists"
import { addExeExt, join } from "patha"
import { addExeExt } from "patha"
import semverCoerce from "semver/functions/coerce"
import semverMajor from "semver/functions/major"
import { addUpdateAlternativesToRc, installAptPack } from "setup-apt"

View File

@ -1,7 +1,7 @@
import { join } from "path"
import { endGroup, startGroup } from "@actions/core"
import { error } from "ci-log"
import pTimeout from "p-timeout"
import { join } from "patha"
import { setupBrew } from "setup-brew"
import { getSuccessMessage, rcOptions } from "./cli-options.js"
import { type ToolName, setups } from "./tool.js"

View File

@ -1,8 +1,8 @@
import path from "path"
import path, { join } from "path"
import { fileURLToPath } from "url"
import { info } from "ci-log"
import { execa } from "execa"
import { addExeExt, join } from "patha"
import { addExeExt } from "patha"
import { installAptPack } from "setup-apt"
import { untildifyUser } from "untildify-user"
import which from "which"

View File

@ -1,10 +1,10 @@
import path from "path"
import path, { join } from "path"
import { fileURLToPath } from "url"
import * as io from "@actions/io"
import { execaSync } from "execa"
import { chmod } from "fs/promises"
import { isUrlOnline } from "is-url-online"
import { addExeExt, join } from "patha"
import { addExeExt } from "patha"
import { ubuntuVersion } from "../../utils/env/ubuntu_version.js"
import { getSpecificVersionAndUrl } from "../../utils/setup/version.js"
import { setupTmpDir, testBin } from "../../utils/tests/test-helpers.js"

View File

@ -1,11 +1,11 @@
import path, { delimiter } from "path"
import path, { delimiter, join } from "path"
import { fileURLToPath } from "url"
import { GITHUB_ACTIONS } from "ci-info"
import { info, warning } from "ci-log"
import { addEnv } from "envosman"
import memoize from "memoizee"
import { pathExists } from "path-exists"
import { addExeExt, join } from "patha"
import { addExeExt } from "patha"
import { addUpdateAlternativesToRc, installAptPack } from "setup-apt"
import { rcOptions } from "../cli-options.js"
import { setupGcc } from "../gcc/gcc.js"

View File

@ -1,4 +1,4 @@
import path from "path"
import path, { join } from "path"
import { fileURLToPath } from "url"
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
@ -6,7 +6,6 @@ import { GITHUB_ACTIONS } from "ci-info"
import { error, info, warning } from "ci-log"
import { findVcvarsall, vsversion_to_versionnumber } from "msvc-dev-cmd/lib.js"
import { pathExists } from "path-exists"
import { join } from "patha"
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
import { setupVCVarsall } from "../vcvarsall/vcvarsall.js"

View File

@ -1,9 +1,9 @@
import { tmpdir } from "os"
import { dirname, join } from "path"
import { execRootSync } from "admina"
import { error, info } from "ci-log"
import { readFile, writeFile } from "fs/promises"
import { DownloaderHelper } from "node-downloader-helper"
import { dirname, join } from "patha"
import { hasNala, installAptPack, qualifiedNeededAptPackage } from "setup-apt"
import which from "which"
import { isUbuntu } from "../utils/env/isUbuntu.js"

View File

@ -1,10 +1,9 @@
import path from "path"
import path, { join } from "path"
import { fileURLToPath } from "url"
import { debug } from "@actions/core"
import { GITHUB_ACTIONS } from "ci-info"
import { info, warning } from "ci-log"
import { pathExists } from "path-exists"
import { join } from "patha"
import { findPyPyVersion } from "setup-python/src/find-pypy.js"
import { useCpythonVersion } from "setup-python/src/find-python.js"
import { IS_MAC } from "setup-python/src/utils.js"

View File

@ -1,6 +1,6 @@
import assert from "assert"
import { homedir } from "os"
import { parse as pathParse } from "path"
import { dirname, join, parse as pathParse } from "path"
import { getExecOutput } from "@actions/exec"
import { GITHUB_ACTIONS } from "ci-info"
import { info, warning } from "ci-log"
@ -9,7 +9,7 @@ import { execa } from "execa"
import { readdir } from "fs/promises"
import memoize from "memoizee"
import { pathExists } from "path-exists"
import { addExeExt, dirname, join } from "patha"
import { addExeExt } from "patha"
import { installAptPack } from "setup-apt"
import { installBrewPack } from "setup-brew"
import which from "which"

View File

@ -1,12 +1,11 @@
import { tmpdir } from "os"
import { basename } from "path"
import { basename, join } from "path"
import { cacheDir, downloadTool, find } from "@actions/tool-cache"
import { GITHUB_ACTIONS } from "ci-info"
import { info, warning } from "ci-log"
import { addPath } from "envosman"
import { chmod } from "fs/promises"
import { pathExists } from "path-exists"
import { join } from "patha"
import retry from "retry-as-promised"
import { maybeGetInput, rcOptions } from "../../cli-options.js"
import { getArchiveType, getExtractFunction } from "./extract.js"

View File

@ -1,10 +1,11 @@
import { dirname, join } from "path"
import { info } from "@actions/core"
import { addPath } from "envosman"
import { execa, execaSync } from "execa"
import memoize from "memoizee"
import { mkdirp } from "mkdirp"
import { pathExists } from "path-exists"
import { addExeExt, dirname, join } from "patha"
import { addExeExt } from "patha"
import { installAptPack } from "setup-apt"
import { untildifyUser } from "untildify-user"
import which from "which"

View File

@ -1,8 +1,9 @@
import { tmpdir } from "os"
import * as path from "path"
import { join } from "path"
import * as io from "@actions/io"
import spawn from "cross-spawn"
import * as path from "patha"
import { addExeExt, join } from "patha"
import { addExeExt } from "patha"
import { pathExists } from "path-exists"

View File

@ -1,9 +1,10 @@
import { dirname, join } from "path"
import { grantUserWriteAccess } from "admina"
import { info, notice } from "ci-log"
import { addPath } from "envosman"
import { execaSync } from "execa"
import { pathExists } from "path-exists"
import { addShExt, addShRelativePrefix, dirname, join } from "patha"
import { addShExt, addShRelativePrefix } from "patha"
import { installAptPack } from "setup-apt"
import which from "which"
import { rcOptions } from "../cli-options.js"