mirror of
https://github.com/actions/cache.git
synced 2025-07-06 17:14:48 +02:00
Compare commits
3 Commits
joshmgross
...
joshmgross
Author | SHA1 | Date | |
---|---|---|---|
b767a42249 | |||
1c5b02ee04 | |||
7352daed78 |
27
README.md
27
README.md
@ -35,7 +35,7 @@ on: push
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
@ -49,31 +49,14 @@ jobs:
|
|||||||
- name: Generate Prime Numbers
|
- name: Generate Prime Numbers
|
||||||
if: steps.cache-primes.outputs.cache-hit != 'true'
|
if: steps.cache-primes.outputs.cache-hit != 'true'
|
||||||
run: /generate-primes.sh -d prime-numbers
|
run: /generate-primes.sh -d prime-numbers
|
||||||
|
|
||||||
- name: Use Prime Numbers
|
- name: Use Prime Numbers
|
||||||
run: /primes.sh -d prime-numbers
|
run: /primes.sh -d prime-numbers
|
||||||
```
|
```
|
||||||
|
|
||||||
## Implementation Examples
|
## Ecosystem Examples
|
||||||
|
|
||||||
Every programming language and framework has its own way of caching.
|
|
||||||
|
|
||||||
See [Examples](examples.md) for a list of `actions/cache` implementations for use with:
|
|
||||||
|
|
||||||
- [C# - Nuget](./examples.md#c---nuget)
|
|
||||||
- [Elixir - Mix](./examples.md#elixir---mix)
|
|
||||||
- [Go - Modules](./examples.md#go---modules)
|
|
||||||
- [Java - Gradle](./examples.md#java---gradle)
|
|
||||||
- [Java - Maven](./examples.md#java---maven)
|
|
||||||
- [Node - npm](./examples.md#node---npm)
|
|
||||||
- [Node - Yarn](./examples.md#node---yarn)
|
|
||||||
- [PHP - Composer](./examples.md#php---composer)
|
|
||||||
- [Python - pip](./examples.md#python---pip)
|
|
||||||
- [Ruby - Gem](./examples.md#ruby---gem)
|
|
||||||
- [Rust - Cargo](./examples.md#rust---cargo)
|
|
||||||
- [Swift, Objective-C - Carthage](./examples.md#swift-objective-c---carthage)
|
|
||||||
- [Swift, Objective-C - CocoaPods](./examples.md#swift-objective-c---cocoapods)
|
|
||||||
|
|
||||||
|
See [Examples](examples.md)
|
||||||
|
|
||||||
## Cache Limits
|
## Cache Limits
|
||||||
|
|
||||||
@ -93,7 +76,7 @@ steps:
|
|||||||
with:
|
with:
|
||||||
path: path/to/dependencies
|
path: path/to/dependencies
|
||||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: /install.sh
|
run: /install.sh
|
||||||
|
@ -6,11 +6,17 @@ jest.mock("@actions/exec");
|
|||||||
jest.mock("@actions/io");
|
jest.mock("@actions/io");
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
|
process.env["windir"] = "C:";
|
||||||
|
|
||||||
jest.spyOn(io, "which").mockImplementation(tool => {
|
jest.spyOn(io, "which").mockImplementation(tool => {
|
||||||
return Promise.resolve(tool);
|
return Promise.resolve(tool);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
afterAll(() => {
|
||||||
|
delete process.env["windir"];
|
||||||
|
});
|
||||||
|
|
||||||
test("extract tar", async () => {
|
test("extract tar", async () => {
|
||||||
const mkdirMock = jest.spyOn(io, "mkdirP");
|
const mkdirMock = jest.spyOn(io, "mkdirP");
|
||||||
const execMock = jest.spyOn(exec, "exec");
|
const execMock = jest.spyOn(exec, "exec");
|
||||||
@ -22,9 +28,7 @@ test("extract tar", async () => {
|
|||||||
expect(mkdirMock).toHaveBeenCalledWith(targetDirectory);
|
expect(mkdirMock).toHaveBeenCalledWith(targetDirectory);
|
||||||
|
|
||||||
const IS_WINDOWS = process.platform === "win32";
|
const IS_WINDOWS = process.platform === "win32";
|
||||||
const tarPath = IS_WINDOWS
|
const tarPath = IS_WINDOWS ? "C:\\System32\\tar.exe" : "tar";
|
||||||
? `${process.env["windir"]}\\System32\\tar.exe`
|
|
||||||
: "tar";
|
|
||||||
expect(execMock).toHaveBeenCalledTimes(1);
|
expect(execMock).toHaveBeenCalledTimes(1);
|
||||||
expect(execMock).toHaveBeenCalledWith(`"${tarPath}"`, [
|
expect(execMock).toHaveBeenCalledWith(`"${tarPath}"`, [
|
||||||
"-xz",
|
"-xz",
|
||||||
@ -43,9 +47,7 @@ test("create tar", async () => {
|
|||||||
await tar.createTar(archivePath, sourceDirectory);
|
await tar.createTar(archivePath, sourceDirectory);
|
||||||
|
|
||||||
const IS_WINDOWS = process.platform === "win32";
|
const IS_WINDOWS = process.platform === "win32";
|
||||||
const tarPath = IS_WINDOWS
|
const tarPath = IS_WINDOWS ? "C:\\System32\\tar.exe" : "tar";
|
||||||
? `${process.env["windir"]}\\System32\\tar.exe`
|
|
||||||
: "tar";
|
|
||||||
expect(execMock).toHaveBeenCalledTimes(1);
|
expect(execMock).toHaveBeenCalledTimes(1);
|
||||||
expect(execMock).toHaveBeenCalledWith(`"${tarPath}"`, [
|
expect(execMock).toHaveBeenCalledWith(`"${tarPath}"`, [
|
||||||
"-cz",
|
"-cz",
|
||||||
|
48
dist/restore/index.js
vendored
48
dist/restore/index.js
vendored
@ -5168,53 +5168,35 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const exec_1 = __webpack_require__(986);
|
const exec_1 = __webpack_require__(986);
|
||||||
const io = __importStar(__webpack_require__(1));
|
const io = __importStar(__webpack_require__(1));
|
||||||
const fs_1 = __webpack_require__(747);
|
|
||||||
function getTarPath() {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
// Explicitly use BSD Tar on Windows
|
|
||||||
const IS_WINDOWS = process.platform === "win32";
|
|
||||||
if (IS_WINDOWS) {
|
|
||||||
const systemTar = `${process.env["windir"]}\\System32\\tar.exe`;
|
|
||||||
if (fs_1.existsSync(systemTar)) {
|
|
||||||
return systemTar;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return yield io.which("tar", true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function execTar(args) {
|
|
||||||
var _a, _b;
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
try {
|
|
||||||
const tarPath = yield getTarPath();
|
|
||||||
const tarExec = process.platform !== "win32" ? `sudo ${tarPath}` : tarPath;
|
|
||||||
yield exec_1.exec(`"${tarExec}"`, args);
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
const IS_WINDOWS = process.platform === "win32";
|
|
||||||
if (IS_WINDOWS) {
|
|
||||||
throw new Error(`Tar failed with error: ${(_a = error) === null || _a === void 0 ? void 0 : _a.message}. Ensure BSD tar is installed and on the PATH.`);
|
|
||||||
}
|
|
||||||
throw new Error(`Tar failed with error: ${(_b = error) === null || _b === void 0 ? void 0 : _b.message}`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function extractTar(archivePath, targetDirectory) {
|
function extractTar(archivePath, targetDirectory) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
// Create directory to extract tar into
|
// Create directory to extract tar into
|
||||||
yield io.mkdirP(targetDirectory);
|
yield io.mkdirP(targetDirectory);
|
||||||
|
// http://man7.org/linux/man-pages/man1/tar.1.html
|
||||||
|
// tar [-options] <name of the tar archive> [files or directories which to add into archive]
|
||||||
const args = ["-xz", "-f", archivePath, "-C", targetDirectory];
|
const args = ["-xz", "-f", archivePath, "-C", targetDirectory];
|
||||||
yield execTar(args);
|
yield exec_1.exec(`"${yield getTarPath()}"`, args);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.extractTar = extractTar;
|
exports.extractTar = extractTar;
|
||||||
function createTar(archivePath, sourceDirectory) {
|
function createTar(archivePath, sourceDirectory) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
// http://man7.org/linux/man-pages/man1/tar.1.html
|
||||||
|
// tar [-options] <name of the tar archive> [files or directories which to add into archive]
|
||||||
const args = ["-cz", "-f", archivePath, "-C", sourceDirectory, "."];
|
const args = ["-cz", "-f", archivePath, "-C", sourceDirectory, "."];
|
||||||
yield execTar(args);
|
yield exec_1.exec(`"${yield getTarPath()}"`, args);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.createTar = createTar;
|
exports.createTar = createTar;
|
||||||
|
function getTarPath() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
// Explicitly use BSD Tar on Windows
|
||||||
|
const IS_WINDOWS = process.platform === "win32";
|
||||||
|
return IS_WINDOWS
|
||||||
|
? `${process.env["windir"]}\\System32\\tar.exe`
|
||||||
|
: yield io.which("tar", true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
48
dist/save/index.js
vendored
48
dist/save/index.js
vendored
@ -5142,53 +5142,35 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const exec_1 = __webpack_require__(986);
|
const exec_1 = __webpack_require__(986);
|
||||||
const io = __importStar(__webpack_require__(1));
|
const io = __importStar(__webpack_require__(1));
|
||||||
const fs_1 = __webpack_require__(747);
|
|
||||||
function getTarPath() {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
// Explicitly use BSD Tar on Windows
|
|
||||||
const IS_WINDOWS = process.platform === "win32";
|
|
||||||
if (IS_WINDOWS) {
|
|
||||||
const systemTar = `${process.env["windir"]}\\System32\\tar.exe`;
|
|
||||||
if (fs_1.existsSync(systemTar)) {
|
|
||||||
return systemTar;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return yield io.which("tar", true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function execTar(args) {
|
|
||||||
var _a, _b;
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
try {
|
|
||||||
const tarPath = yield getTarPath();
|
|
||||||
const tarExec = process.platform !== "win32" ? `sudo ${tarPath}` : tarPath;
|
|
||||||
yield exec_1.exec(`"${tarExec}"`, args);
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
const IS_WINDOWS = process.platform === "win32";
|
|
||||||
if (IS_WINDOWS) {
|
|
||||||
throw new Error(`Tar failed with error: ${(_a = error) === null || _a === void 0 ? void 0 : _a.message}. Ensure BSD tar is installed and on the PATH.`);
|
|
||||||
}
|
|
||||||
throw new Error(`Tar failed with error: ${(_b = error) === null || _b === void 0 ? void 0 : _b.message}`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function extractTar(archivePath, targetDirectory) {
|
function extractTar(archivePath, targetDirectory) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
// Create directory to extract tar into
|
// Create directory to extract tar into
|
||||||
yield io.mkdirP(targetDirectory);
|
yield io.mkdirP(targetDirectory);
|
||||||
|
// http://man7.org/linux/man-pages/man1/tar.1.html
|
||||||
|
// tar [-options] <name of the tar archive> [files or directories which to add into archive]
|
||||||
const args = ["-xz", "-f", archivePath, "-C", targetDirectory];
|
const args = ["-xz", "-f", archivePath, "-C", targetDirectory];
|
||||||
yield execTar(args);
|
yield exec_1.exec(`"${yield getTarPath()}"`, args);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.extractTar = extractTar;
|
exports.extractTar = extractTar;
|
||||||
function createTar(archivePath, sourceDirectory) {
|
function createTar(archivePath, sourceDirectory) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
// http://man7.org/linux/man-pages/man1/tar.1.html
|
||||||
|
// tar [-options] <name of the tar archive> [files or directories which to add into archive]
|
||||||
const args = ["-cz", "-f", archivePath, "-C", sourceDirectory, "."];
|
const args = ["-cz", "-f", archivePath, "-C", sourceDirectory, "."];
|
||||||
yield execTar(args);
|
yield exec_1.exec(`"${yield getTarPath()}"`, args);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.createTar = createTar;
|
exports.createTar = createTar;
|
||||||
|
function getTarPath() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
// Explicitly use BSD Tar on Windows
|
||||||
|
const IS_WINDOWS = process.platform === "win32";
|
||||||
|
return IS_WINDOWS
|
||||||
|
? `${process.env["windir"]}\\System32\\tar.exe`
|
||||||
|
: yield io.which("tar", true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
19
examples.md
19
examples.md
@ -1,6 +1,6 @@
|
|||||||
# Examples
|
# Examples
|
||||||
|
|
||||||
- [C# - NuGet](#c---nuget)
|
- [C# - Nuget](#c---nuget)
|
||||||
- [Elixir - Mix](#elixir---mix)
|
- [Elixir - Mix](#elixir---mix)
|
||||||
- [Go - Modules](#go---modules)
|
- [Go - Modules](#go---modules)
|
||||||
- [Java - Gradle](#java---gradle)
|
- [Java - Gradle](#java---gradle)
|
||||||
@ -14,7 +14,7 @@
|
|||||||
- [Swift, Objective-C - Carthage](#swift-objective-c---carthage)
|
- [Swift, Objective-C - Carthage](#swift-objective-c---carthage)
|
||||||
- [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods)
|
- [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods)
|
||||||
|
|
||||||
## C# - NuGet
|
## C# - Nuget
|
||||||
Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies):
|
Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies):
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@ -26,21 +26,6 @@ Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/packa
|
|||||||
${{ runner.os }}-nuget-
|
${{ runner.os }}-nuget-
|
||||||
```
|
```
|
||||||
|
|
||||||
Depending on the environment, huge packages might be pre-installed in the global cache folder.
|
|
||||||
If you do not want to include them, consider to move the cache folder like below.
|
|
||||||
>Note: This workflow does not work for projects that require files to be placed in user profile package folder
|
|
||||||
```yaml
|
|
||||||
env:
|
|
||||||
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
|
||||||
steps:
|
|
||||||
- uses: actions/cache@v1
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}/.nuget/packages
|
|
||||||
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-nuget-
|
|
||||||
```
|
|
||||||
|
|
||||||
## Elixir - Mix
|
## Elixir - Mix
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v1
|
- uses: actions/cache@v1
|
||||||
|
12
package-lock.json
generated
12
package-lock.json
generated
@ -4859,9 +4859,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"version": "1.19.1",
|
"version": "1.18.2",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz",
|
||||||
"integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
|
"integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prettier-linter-helpers": {
|
"prettier-linter-helpers": {
|
||||||
@ -5983,9 +5983,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "3.7.3",
|
"version": "3.6.4",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.3.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz",
|
||||||
"integrity": "sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw==",
|
"integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"uglify-js": {
|
"uglify-js": {
|
||||||
|
@ -46,8 +46,8 @@
|
|||||||
"jest": "^24.8.0",
|
"jest": "^24.8.0",
|
||||||
"jest-circus": "^24.7.1",
|
"jest-circus": "^24.7.1",
|
||||||
"nock": "^11.7.0",
|
"nock": "^11.7.0",
|
||||||
"prettier": "^1.19.1",
|
"prettier": "1.18.2",
|
||||||
"ts-jest": "^24.0.2",
|
"ts-jest": "^24.0.2",
|
||||||
"typescript": "^3.7.3"
|
"typescript": "^3.6.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
36
src/tar.ts
36
src/tar.ts
@ -1,33 +1,12 @@
|
|||||||
import { exec } from "@actions/exec";
|
import { exec } from "@actions/exec";
|
||||||
import * as io from "@actions/io";
|
import * as io from "@actions/io";
|
||||||
import { existsSync } from "fs";
|
|
||||||
|
|
||||||
async function getTarPath(): Promise<string> {
|
async function getTarPath(): Promise<string> {
|
||||||
// Explicitly use BSD Tar on Windows
|
// Explicitly use BSD Tar on Windows
|
||||||
const IS_WINDOWS = process.platform === "win32";
|
const IS_WINDOWS = process.platform === "win32";
|
||||||
if (IS_WINDOWS) {
|
return IS_WINDOWS
|
||||||
const systemTar = `${process.env["windir"]}\\System32\\tar.exe`;
|
? `${process.env["windir"]}\\System32\\tar.exe`
|
||||||
if (existsSync(systemTar)) {
|
: await io.which("tar", true);
|
||||||
return systemTar;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return await io.which("tar", true);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function execTar(args: string[]): Promise<void> {
|
|
||||||
try {
|
|
||||||
const tarPath = await getTarPath();
|
|
||||||
const tarExec = process.platform !== "win32" ? `sudo ${tarPath}` : tarPath;
|
|
||||||
await exec(`"${tarExec}"`, args);
|
|
||||||
} catch (error) {
|
|
||||||
const IS_WINDOWS = process.platform === "win32";
|
|
||||||
if (IS_WINDOWS) {
|
|
||||||
throw new Error(
|
|
||||||
`Tar failed with error: ${error?.message}. Ensure BSD tar is installed and on the PATH.`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
throw new Error(`Tar failed with error: ${error?.message}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function extractTar(
|
export async function extractTar(
|
||||||
@ -36,14 +15,19 @@ export async function extractTar(
|
|||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
// Create directory to extract tar into
|
// Create directory to extract tar into
|
||||||
await io.mkdirP(targetDirectory);
|
await io.mkdirP(targetDirectory);
|
||||||
|
|
||||||
|
// http://man7.org/linux/man-pages/man1/tar.1.html
|
||||||
|
// tar [-options] <name of the tar archive> [files or directories which to add into archive]
|
||||||
const args = ["-xz", "-f", archivePath, "-C", targetDirectory];
|
const args = ["-xz", "-f", archivePath, "-C", targetDirectory];
|
||||||
await execTar(args);
|
await exec(`"${await getTarPath()}"`, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function createTar(
|
export async function createTar(
|
||||||
archivePath: string,
|
archivePath: string,
|
||||||
sourceDirectory: string
|
sourceDirectory: string
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
|
// http://man7.org/linux/man-pages/man1/tar.1.html
|
||||||
|
// tar [-options] <name of the tar archive> [files or directories which to add into archive]
|
||||||
const args = ["-cz", "-f", archivePath, "-C", sourceDirectory, "."];
|
const args = ["-cz", "-f", archivePath, "-C", sourceDirectory, "."];
|
||||||
await execTar(args);
|
await exec(`"${await getTarPath()}"`, args);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user