mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Add force-local flag to tar archiving on windows (#11914)
This commit adds the ability to archive tars on windows builds. As windows filepaths have colons in them (i.e. c:/kibana) tar thinks it is accessing a remote datasource. Adding the --force-local flag tells tar to archive a local file.
This commit is contained in:
parent
04ee900924
commit
829e0bd64d
1 changed files with 8 additions and 1 deletions
|
@ -16,7 +16,14 @@ export default (grunt) => {
|
|||
if (/windows/.test(name)) {
|
||||
await exec('zip', ['-rq', '-ll', zipPath, buildName]);
|
||||
} else {
|
||||
await exec('tar', ['-zchf', tarPath, buildName]);
|
||||
const tarArguments = ['-zchf', tarPath, buildName];
|
||||
|
||||
// Add a flag to handle filepaths with colons (i.e. C://...) on windows
|
||||
if (/^win/.test(process.platform)) {
|
||||
tarArguments.push('--force-local');
|
||||
}
|
||||
|
||||
await exec('tar', tarArguments);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue