Skip to content

Commit

Permalink
Update cp.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
sjawhar authored Nov 20, 2024
1 parent 5340328 commit 913a021
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/cp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,12 @@ export class Cp {
}
},
)
.then((conn) => {
conn.onclose = (event) => {
resolve();
};
})
.catch(reject);
conn.onclose = (event) => {
resolve();
};
});
}

Expand All @@ -95,7 +97,7 @@ export class Cp {
const readStream = fs.createReadStream(tmpFileName);
const errStream = new WritableStreamBuffer();
return new Promise<void>((resolve, reject) => {
const conn = await this.execInstance
this.execInstance
.exec(
namespace,
podName,
Expand All @@ -118,10 +120,12 @@ export class Cp {
}
},
)
.then((conn) => {
conn.onclose = (event) => {
resolve();
};
})
.catch(reject);
conn.onclose = (event) => {
resolve();
};
});
}
}

0 comments on commit 913a021

Please sign in to comment.