mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Type check safe-chain package
This commit is contained in:
parent
d5dc801c00
commit
c88b1a624f
60 changed files with 1179 additions and 33 deletions
|
|
@ -28,6 +28,11 @@ export async function setupCi() {
|
|||
ui.writeInformation(`Added shims directory to PATH for CI environments.`);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} shimsDir
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function createUnixShims(shimsDir) {
|
||||
// Read the template file
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
|
|
@ -64,6 +69,11 @@ function createUnixShims(shimsDir) {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} shimsDir
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function createWindowsShims(shimsDir) {
|
||||
// Read the template file
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
|
|
@ -97,6 +107,11 @@ function createWindowsShims(shimsDir) {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} shimsDir
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function createShims(shimsDir) {
|
||||
if (os.platform() === "win32") {
|
||||
createWindowsShims(shimsDir);
|
||||
|
|
@ -105,6 +120,11 @@ function createShims(shimsDir) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} shimsDir
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
function modifyPathForCi(shimsDir) {
|
||||
if (process.env.GITHUB_PATH) {
|
||||
// In GitHub Actions, append the shims directory to GITHUB_PATH
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue