@litodocs/cli 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -123,11 +123,15 @@ export async function fetchGitHubTemplate(owner, repo, ref) {
|
|
|
123
123
|
|
|
124
124
|
// Use tar to extract (available on all Unix systems and modern Windows)
|
|
125
125
|
const { execa } = await import('execa');
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
'-
|
|
129
|
-
'
|
|
130
|
-
|
|
126
|
+
const isWin = process.platform === 'win32';
|
|
127
|
+
const tarArgs = [
|
|
128
|
+
'-xzf', isWin ? tempTarPath.replace(/\\/g, '/') : tempTarPath,
|
|
129
|
+
'-C', isWin ? cachePath.replace(/\\/g, '/') : cachePath,
|
|
130
|
+
'--strip-components=1',
|
|
131
|
+
// On Windows, GNU tar misinterprets drive letters (C:) as remote hosts
|
|
132
|
+
...(isWin ? ['--force-local'] : [])
|
|
133
|
+
];
|
|
134
|
+
await execa('tar', tarArgs);
|
|
131
135
|
|
|
132
136
|
// Cleanup temp tarball
|
|
133
137
|
await remove(tempTarPath);
|