@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@litodocs/cli",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Beautiful documentation sites from Markdown. Fast, simple, and open-source.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -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
- await execa('tar', [
127
- '-xzf', tempTarPath,
128
- '-C', cachePath,
129
- '--strip-components=1'
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);