mirror of https://github.com/aminya/setup-cpp
feat: use grantUserWriteAccess from admina and await it
This commit is contained in:
parent
5f4cbc86cd
commit
4f69ae3519
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
|
@ -86,7 +86,7 @@
|
|||
"@types/semver": "^7.5.0",
|
||||
"@types/which": "^3.0.0",
|
||||
"@upleveled/babel-plugin-remove-node-prefix": "github:aminya/babel-plugin-remove-node-prefix#95fcbd92405b99a6eece48c493548996f12e6519",
|
||||
"admina": "^0.1.3",
|
||||
"admina": "^0.2.1",
|
||||
"caxa": "^3.0.1",
|
||||
"ci-info": "^3.8.0",
|
||||
"ci-log": "workspace:*",
|
||||
|
@ -126,7 +126,6 @@
|
|||
"typescript": "^5.1.6",
|
||||
"ubuntu-version": "^2.0.0",
|
||||
"untildify-user": "workspace:*",
|
||||
"user-access": "workspace:*",
|
||||
"which": "^3.0.1"
|
||||
},
|
||||
"productionDependencies": [
|
||||
|
@ -155,8 +154,7 @@
|
|||
"simple-update-notifier",
|
||||
"time-delta",
|
||||
"ubuntu-version",
|
||||
"untildify-user",
|
||||
"user-access"
|
||||
"untildify-user"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12.x"
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
<h1 align="center">user-access</h1>
|
||||
<p>
|
||||
<img alt="Version" src="https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000" />
|
||||
<a href="#" target="_blank">
|
||||
<img alt="License: Apache--2.0" src="https://img.shields.io/badge/License-Apache--2.0-yellow.svg" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
> Give user access to the given path
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install --save user-access
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
<!-- INSERT GENERATED DOCS START -->
|
||||
|
||||
### `grantUserWriteAccess` (function)
|
||||
|
||||
Give the user access to the given path and its sub-directories. It changes the owner to the SUDO_USER. This allows
|
||||
the user to use the folder without sudo
|
||||
|
||||
**Parameters:**
|
||||
|
||||
- path (`string`) - The path to give the user access to
|
||||
|
||||
**returns:** Promise<void>
|
||||
|
||||
<!-- INSERT GENERATED DOCS END -->
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
You can sponsor my work here:
|
||||
|
||||
https://github.com/sponsors/aminya
|
||||
|
||||
Pull requests, issues and feature requests are welcome.
|
||||
See the [Contributing guide](https://github.com/aminya/setup-cpp/blob/master/CONTRIBUTING.md).
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"name": "user-access",
|
||||
"version": "1.0.0",
|
||||
"description": "Give user access to the given path",
|
||||
"homepage": "https://github.com/aminya/setup-cpp",
|
||||
"license": "Apache-2.0",
|
||||
"author": "Amin Yahyaabadi",
|
||||
"main": "./dist/index.js",
|
||||
"source": "./src/index.ts",
|
||||
"scripts": {
|
||||
"build": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"admina": "0.1.1"
|
||||
},
|
||||
"keywords": [
|
||||
"chown",
|
||||
"recursive",
|
||||
"user-access",
|
||||
"user",
|
||||
"access",
|
||||
"path",
|
||||
"fs",
|
||||
"home",
|
||||
"directory",
|
||||
"shell",
|
||||
"bash"
|
||||
]
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
import { isSudo, execRoot } from "admina"
|
||||
import { statSync } from "fs"
|
||||
|
||||
/**
|
||||
* Give the user access to the given path (and its sub-directories if a directory). It changes the owner to the
|
||||
* SUDO_USER. This allows the user to use the folder without sudo
|
||||
*
|
||||
* @param path The path to give the user access to
|
||||
*/
|
||||
export async function grantUserWriteAccess(path: string) {
|
||||
if (
|
||||
(process.platform === "linux" || process.platform === "darwin") &&
|
||||
isSudo() &&
|
||||
process.env.SUDO_USER !== undefined
|
||||
) {
|
||||
const isDirectory = statSync(path).isDirectory()
|
||||
await execRoot("chown", [...(isDirectory ? ["-R"] : []), process.env.SUDO_USER, path], {
|
||||
cwd: path,
|
||||
stdio: "inherit",
|
||||
shell: true,
|
||||
})
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist"
|
||||
},
|
||||
"include": ["./src"]
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
lockfileVersion: '6.1'
|
||||
lockfileVersion: '6.0'
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
|
@ -57,8 +57,8 @@ importers:
|
|||
specifier: github:aminya/babel-plugin-remove-node-prefix#95fcbd92405b99a6eece48c493548996f12e6519
|
||||
version: github.com/aminya/babel-plugin-remove-node-prefix/95fcbd92405b99a6eece48c493548996f12e6519(@babel/core@7.22.9)
|
||||
admina:
|
||||
specifier: ^0.1.3
|
||||
version: 0.1.3
|
||||
specifier: ^0.2.1
|
||||
version: 0.2.1
|
||||
caxa:
|
||||
specifier: ^3.0.1
|
||||
version: 3.0.1
|
||||
|
@ -176,9 +176,6 @@ importers:
|
|||
untildify-user:
|
||||
specifier: workspace:*
|
||||
version: link:packages/untildify-user
|
||||
user-access:
|
||||
specifier: workspace:*
|
||||
version: link:packages/user-access
|
||||
which:
|
||||
specifier: ^3.0.1
|
||||
version: 3.0.1
|
||||
|
@ -214,12 +211,6 @@ importers:
|
|||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
|
||||
packages/user-access:
|
||||
dependencies:
|
||||
admina:
|
||||
specifier: 0.1.1
|
||||
version: 0.1.1
|
||||
|
||||
packages:
|
||||
|
||||
/@aashutoshrathi/word-wrap@1.2.6:
|
||||
|
@ -766,6 +757,7 @@ packages:
|
|||
/@babel/runtime@7.22.6:
|
||||
resolution: {integrity: sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
regenerator-runtime: 0.13.11
|
||||
dev: true
|
||||
|
@ -3089,8 +3081,8 @@ packages:
|
|||
which: 2.0.2
|
||||
dev: false
|
||||
|
||||
/admina@0.1.3:
|
||||
resolution: {integrity: sha512-7ZqOsOG1mZ8QQytEAGYoH7niwy2tOTaaxhnOQS+ed7ka23menMFGxOzrhT9/4GHZ2PehCH9M6V9xfyUM+Ye1Ug==}
|
||||
/admina@0.2.1:
|
||||
resolution: {integrity: sha512-Q8pZCB6I8Oog7+WS0zeIzCTctccwzj9srV/1dVslZZXSj7lJ8BibmhgOyrfFqkKIezH+AwoEBQFRSjkuiZbFNg==}
|
||||
dependencies:
|
||||
execa: 5.1.1
|
||||
is-admin: 4.0.0
|
||||
|
@ -3150,6 +3142,7 @@ packages:
|
|||
/ansi-regex@2.1.1:
|
||||
resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -3166,6 +3159,7 @@ packages:
|
|||
/ansi-styles@2.2.1:
|
||||
resolution: {integrity: sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -3258,6 +3252,7 @@ packages:
|
|||
|
||||
/aria-query@5.3.0:
|
||||
resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
dequal: 2.0.3
|
||||
dev: true
|
||||
|
@ -3303,6 +3298,7 @@ packages:
|
|||
/array-uniq@1.0.3:
|
||||
resolution: {integrity: sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -3361,6 +3357,7 @@ packages:
|
|||
|
||||
/ast-types-flow@0.0.7:
|
||||
resolution: {integrity: sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -3380,17 +3377,20 @@ packages:
|
|||
/axe-core@3.5.6:
|
||||
resolution: {integrity: sha512-LEUDjgmdJoA3LqklSTwKYqkjcZ4HKc4ddIYGSAiSkr46NTjzg2L9RNB+lekO9P7Dlpa87+hBtzc2Fzn/+GUWMQ==}
|
||||
engines: {node: '>=4'}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/axe-core@4.7.2:
|
||||
resolution: {integrity: sha512-zIURGIS1E1Q4pcrMjp+nnEh+16G56eG/MUllJH8yEvw7asDo7Ac9uhC9KIH5jzpITueEZolfYglnCGIuSBz39g==}
|
||||
engines: {node: '>=4'}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/axobject-query@3.2.1:
|
||||
resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
dequal: 2.0.3
|
||||
dev: true
|
||||
|
@ -3398,6 +3398,7 @@ packages:
|
|||
|
||||
/babel-code-frame@6.26.0:
|
||||
resolution: {integrity: sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
chalk: 1.1.3
|
||||
esutils: 2.0.3
|
||||
|
@ -3409,6 +3410,7 @@ packages:
|
|||
resolution: {integrity: sha512-i2yKOhjgwUbUrJ8oJm6QqRzltIoFahGNPZ0HF22lUN4H1DW03JQyJm7WSv+I1LURQWjDNhVqFo04acYa07rhOQ==}
|
||||
engines: {node: '>=4'}
|
||||
deprecated: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
babel-code-frame: 6.26.0
|
||||
babel-traverse: 6.26.0
|
||||
|
@ -3439,6 +3441,7 @@ packages:
|
|||
|
||||
/babel-messages@6.23.0:
|
||||
resolution: {integrity: sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
babel-runtime: 6.26.0
|
||||
dev: true
|
||||
|
@ -3500,6 +3503,7 @@ packages:
|
|||
|
||||
/babel-runtime@6.26.0:
|
||||
resolution: {integrity: sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
core-js: 2.6.12
|
||||
regenerator-runtime: 0.11.1
|
||||
|
@ -3508,6 +3512,7 @@ packages:
|
|||
|
||||
/babel-traverse@6.26.0:
|
||||
resolution: {integrity: sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
babel-code-frame: 6.26.0
|
||||
babel-messages: 6.23.0
|
||||
|
@ -3525,6 +3530,7 @@ packages:
|
|||
|
||||
/babel-types@6.26.0:
|
||||
resolution: {integrity: sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
babel-runtime: 6.26.0
|
||||
esutils: 2.0.3
|
||||
|
@ -3536,6 +3542,7 @@ packages:
|
|||
/babylon@6.18.0:
|
||||
resolution: {integrity: sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -3543,6 +3550,7 @@ packages:
|
|||
resolution: {integrity: sha512-+rq2cr4GDhtToEzKFD6KZZMDBXhjFAr9JjPw9pAppZACeEWqNM294j+NdBzkSHYXwzzBmVjZ3nEVJlOhbR2gOQ==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -3568,6 +3576,7 @@ packages:
|
|||
/binary-extensions@2.2.0:
|
||||
resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==}
|
||||
engines: {node: '>=8'}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -3762,6 +3771,7 @@ packages:
|
|||
/chalk@1.1.3:
|
||||
resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
ansi-styles: 2.2.1
|
||||
escape-string-regexp: 1.0.5
|
||||
|
@ -3903,6 +3913,7 @@ packages:
|
|||
resolution: {integrity: sha512-hzWp6TUE2d/jCcN67LrW1eh5b/rSDKQK6oD6VMLlggYVUUFexgTH9z3dNYihzX4RMhze5FTUsUmOXViJKFQR/A==}
|
||||
engines: {node: '>=6'}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -4058,6 +4069,7 @@ packages:
|
|||
|
||||
/confusing-browser-globals@1.0.11:
|
||||
resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -4305,6 +4317,7 @@ packages:
|
|||
|
||||
/damerau-levenshtein@1.0.8:
|
||||
resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -4314,6 +4327,7 @@ packages:
|
|||
|
||||
/debug@2.6.9:
|
||||
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
|
||||
requiresBuild: true
|
||||
peerDependencies:
|
||||
supports-color: '*'
|
||||
peerDependenciesMeta:
|
||||
|
@ -4781,6 +4795,7 @@ packages:
|
|||
/eslint-config-airbnb-base@14.2.1(eslint-plugin-import@2.28.0)(eslint@8.46.0):
|
||||
resolution: {integrity: sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==}
|
||||
engines: {node: '>= 6'}
|
||||
requiresBuild: true
|
||||
peerDependencies:
|
||||
eslint: ^5.16.0 || ^6.8.0 || ^7.2.0
|
||||
eslint-plugin-import: ^2.22.1
|
||||
|
@ -4796,6 +4811,7 @@ packages:
|
|||
/eslint-config-airbnb@18.2.1(eslint-plugin-import@2.28.0)(eslint-plugin-jsx-a11y@6.7.1)(eslint-plugin-react-hooks@4.6.0)(eslint-plugin-react@7.23.2)(eslint@8.46.0):
|
||||
resolution: {integrity: sha512-glZNDEZ36VdlZWoxn/bUR1r/sdFKPd1mHPbqUtkctgNG4yT2DLLtJ3D+yCV+jzZCc2V1nBVkmdknOJBZ5Hc0fg==}
|
||||
engines: {node: '>= 6'}
|
||||
requiresBuild: true
|
||||
peerDependencies:
|
||||
eslint: ^5.16.0 || ^6.8.0 || ^7.2.0
|
||||
eslint-plugin-import: ^2.22.1
|
||||
|
@ -4996,6 +5012,7 @@ packages:
|
|||
/eslint-plugin-jsx-a11y@6.7.1(eslint@8.46.0):
|
||||
resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==}
|
||||
engines: {node: '>=4.0'}
|
||||
requiresBuild: true
|
||||
peerDependencies:
|
||||
eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8
|
||||
dependencies:
|
||||
|
@ -5054,11 +5071,13 @@ packages:
|
|||
|
||||
/eslint-plugin-react-native-globals@0.1.2:
|
||||
resolution: {integrity: sha512-9aEPf1JEpiTjcFAmmyw8eiIXmcNZOqaZyHO77wgm0/dWfT/oxC1SrIq8ET38pMxHYrcB6Uew+TzUVsBeczF88g==}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/eslint-plugin-react-native@3.11.0(eslint@8.46.0):
|
||||
resolution: {integrity: sha512-7F3OTwrtQPfPFd+VygqKA2VZ0f2fz0M4gJmry/TRE18JBb94/OtMxwbL7Oqwu7FGyrdeIOWnXQbBAveMcSTZIA==}
|
||||
requiresBuild: true
|
||||
peerDependencies:
|
||||
eslint: ^3.17.0 || ^4 || ^5 || ^6 || ^7
|
||||
dependencies:
|
||||
|
@ -5073,6 +5092,7 @@ packages:
|
|||
/eslint-plugin-react@7.23.2(eslint@8.46.0):
|
||||
resolution: {integrity: sha512-AfjgFQB+nYszudkxRkTFu0UR1zEQig0ArVMPloKhxwlwkzaw/fBiH0QWcBBhZONlXqQC51+nfqFrkn4EzHcGBw==}
|
||||
engines: {node: '>=4'}
|
||||
requiresBuild: true
|
||||
peerDependencies:
|
||||
eslint: ^3 || ^4 || ^5 || ^6 || ^7
|
||||
dependencies:
|
||||
|
@ -5126,6 +5146,7 @@ packages:
|
|||
/eslint-scope@3.7.3:
|
||||
resolution: {integrity: sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA==}
|
||||
engines: {node: '>=4.0.0'}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
esrecurse: 4.3.0
|
||||
estraverse: 4.3.0
|
||||
|
@ -5151,6 +5172,7 @@ packages:
|
|||
/eslint-utils@1.4.3:
|
||||
resolution: {integrity: sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==}
|
||||
engines: {node: '>=6'}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
eslint-visitor-keys: 1.3.0
|
||||
dev: true
|
||||
|
@ -5411,6 +5433,7 @@ packages:
|
|||
/fill-range@7.0.1:
|
||||
resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==}
|
||||
engines: {node: '>=8'}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
to-regex-range: 5.0.1
|
||||
dev: true
|
||||
|
@ -5706,6 +5729,7 @@ packages:
|
|||
/globals@9.18.0:
|
||||
resolution: {integrity: sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -5806,6 +5830,7 @@ packages:
|
|||
/has-ansi@2.0.0:
|
||||
resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
ansi-regex: 2.1.1
|
||||
dev: true
|
||||
|
@ -6015,6 +6040,7 @@ packages:
|
|||
/iconv-lite@0.6.3:
|
||||
resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
safer-buffer: 2.1.2
|
||||
dev: true
|
||||
|
@ -6113,6 +6139,7 @@ packages:
|
|||
|
||||
/invariant@2.2.4:
|
||||
resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
loose-envify: 1.4.0
|
||||
dev: true
|
||||
|
@ -6149,6 +6176,7 @@ packages:
|
|||
/is-binary-path@2.1.0:
|
||||
resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
|
||||
engines: {node: '>=8'}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
binary-extensions: 2.2.0
|
||||
dev: true
|
||||
|
@ -6289,6 +6317,7 @@ packages:
|
|||
/is-number@7.0.0:
|
||||
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
|
||||
engines: {node: '>=0.12.0'}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
|
||||
/is-obj@2.0.0:
|
||||
|
@ -6874,6 +6903,7 @@ packages:
|
|||
|
||||
/js-tokens@3.0.2:
|
||||
resolution: {integrity: sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -6979,6 +7009,7 @@ packages:
|
|||
/jsx-ast-utils@2.4.1:
|
||||
resolution: {integrity: sha512-z1xSldJ6imESSzOjd3NNkieVJKRlKYSOtMG8SFyCj2FIrvSaSuli/WjpBkEzCBoR9bYYYFgqJw61Xhu7Lcgk+w==}
|
||||
engines: {node: '>=4.0'}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
array-includes: 3.1.6
|
||||
object.assign: 4.1.4
|
||||
|
@ -7013,11 +7044,13 @@ packages:
|
|||
|
||||
/language-subtag-registry@0.3.22:
|
||||
resolution: {integrity: sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/language-tags@1.0.5:
|
||||
resolution: {integrity: sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
language-subtag-registry: 0.3.22
|
||||
dev: true
|
||||
|
@ -7696,6 +7729,7 @@ packages:
|
|||
|
||||
/ms@2.0.0:
|
||||
resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -7772,6 +7806,7 @@ packages:
|
|||
/node-gyp-build-optional-packages@5.0.7:
|
||||
resolution: {integrity: sha512-YlCCc6Wffkx0kHkmam79GKvDQ6x+QZkMjFGrIMxgFNILFvGSbCp2fCBC55pGTT9gVaz8Na5CLmxt/urtzRv36w==}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -8676,6 +8711,7 @@ packages:
|
|||
/readdirp@3.6.0:
|
||||
resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
|
||||
engines: {node: '>=8.10.0'}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
picomatch: 2.3.1
|
||||
dev: true
|
||||
|
@ -8695,6 +8731,7 @@ packages:
|
|||
|
||||
/regenerator-runtime@0.11.1:
|
||||
resolution: {integrity: sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -8914,6 +8951,7 @@ packages:
|
|||
|
||||
/safer-buffer@2.1.2:
|
||||
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -9255,6 +9293,7 @@ packages:
|
|||
/strip-ansi@3.0.1:
|
||||
resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
ansi-regex: 2.1.1
|
||||
dev: true
|
||||
|
@ -9324,6 +9363,7 @@ packages:
|
|||
/supports-color@2.0.0:
|
||||
resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==}
|
||||
engines: {node: '>=0.8.0'}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -9446,6 +9486,7 @@ packages:
|
|||
/to-fast-properties@1.0.3:
|
||||
resolution: {integrity: sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
|
@ -9457,6 +9498,7 @@ packages:
|
|||
/to-regex-range@5.0.1:
|
||||
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
|
||||
engines: {node: '>=8.0'}
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
is-number: 7.0.0
|
||||
dev: true
|
||||
|
|
|
@ -6,7 +6,7 @@ import { error, warning } from "ci-log"
|
|||
import { execPowershell } from "exec-powershell"
|
||||
import { delimiter } from "path"
|
||||
import escapeSpace from "escape-path-with-spaces"
|
||||
import { grantUserWriteAccess } from "user-access"
|
||||
import { grantUserWriteAccess } from "admina"
|
||||
import escapeQuote from "escape-quotes"
|
||||
import { pathExists } from "path-exists"
|
||||
|
||||
|
@ -212,7 +212,7 @@ export async function finalizeCpprc() {
|
|||
writeFileSync(cpprc_path, unique_entries.join("\n"))
|
||||
|
||||
try {
|
||||
grantUserWriteAccess(cpprc_path)
|
||||
await grantUserWriteAccess(cpprc_path)
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ import { mkdirP } from "@actions/io"
|
|||
import which from "which"
|
||||
import { setupSevenZip } from "../../sevenzip/sevenzip"
|
||||
import { warning } from "ci-log"
|
||||
import { grantUserWriteAccess } from "user-access"
|
||||
import { grantUserWriteAccess } from "admina"
|
||||
export { extractTar, extractXar } from "@actions/tool-cache"
|
||||
|
||||
let sevenZip: string | undefined
|
||||
|
@ -11,7 +11,7 @@ let sevenZip: string | undefined
|
|||
/// Extract 7z using 7z
|
||||
export async function extract7Zip(file: string, dest: string) {
|
||||
await execa(await getSevenZip(), ["x", file, `-o${dest}`, "-y"], { stdio: "inherit" })
|
||||
grantUserWriteAccess(dest)
|
||||
await grantUserWriteAccess(dest)
|
||||
return dest
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { execaSync } from "execa"
|
|||
import { notice } from "ci-log"
|
||||
import { pathExists } from "path-exists"
|
||||
import { addShExt, addShRelativePrefix, dirname, join } from "patha"
|
||||
import { grantUserWriteAccess } from "user-access"
|
||||
import { grantUserWriteAccess } from "admina"
|
||||
import which from "which"
|
||||
import { addPath } from "../utils/env/addEnv"
|
||||
import { hasDnf } from "../utils/env/hasDnf"
|
||||
|
@ -62,7 +62,7 @@ export async function setupVcpkg(_version: string, setupDir: string, _arch: stri
|
|||
stdio: "inherit",
|
||||
})
|
||||
|
||||
grantUserWriteAccess(setupDir)
|
||||
await grantUserWriteAccess(setupDir)
|
||||
|
||||
await addPath(setupDir)
|
||||
// eslint-disable-next-line require-atomic-updates
|
||||
|
|
Loading…
Reference in New Issue