Skip to content

Commit e745839

Browse files
committed
fix: cp from pod was broken
1 parent 184cb5b commit e745839

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/cp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class Cp {
2626
tgtPath: string,
2727
cwd?: string,
2828
): Promise<void> {
29-
const command = ['tar', 'zcf', '-'];
29+
const command = ['tar', 'cf', '-'];
3030
if (cwd) {
3131
command.push('-C', cwd);
3232
}

src/cp_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('Cp', () => {
2222
const container = 'container';
2323
const srcPath = '/';
2424
const tgtPath = '/';
25-
const cmdArray = ['tar', 'zcf', '-', srcPath];
25+
const cmdArray = ['tar', 'cf', '-', srcPath];
2626
const path = `/api/v1/namespaces/${namespace}/pods/${pod}/exec`;
2727

2828
const query = {
@@ -51,7 +51,7 @@ describe('Cp', () => {
5151
const srcPath = '/';
5252
const tgtPath = '/';
5353
const cwd = '/abc';
54-
const cmdArray = ['tar', 'zcf', '-', '-C', cwd, srcPath];
54+
const cmdArray = ['tar', 'cf', '-', '-C', cwd, srcPath];
5555
const path = `/api/v1/namespaces/${namespace}/pods/${pod}/exec`;
5656

5757
const query = {

0 commit comments

Comments
 (0)