Skip to content

Commit f2d30d4

Browse files
committed
Fix symlink support
1 parent 1b78407 commit f2d30d4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

packages/eas-cli/src/vcs/local.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import fg from 'fast-glob';
2-
import fs from 'fs-extra';
2+
import fs from 'fs/promises';
3+
import fsExtra from 'fs-extra';
34
import createIgnore, { Ignore as SingleFileIgnore } from 'ignore';
45
import path from 'path';
56

@@ -36,10 +37,10 @@ export class Ignore {
3637

3738
public async initIgnoreAsync(): Promise<void> {
3839
const easIgnorePath = path.join(this.rootDir, EASIGNORE_FILENAME);
39-
if (await fs.pathExists(easIgnorePath)) {
40+
if (await fsExtra.pathExists(easIgnorePath)) {
4041
this.ignoreMapping = [
4142
['', createIgnore().add(DEFAULT_IGNORE)],
42-
['', createIgnore().add(await fs.readFile(easIgnorePath, 'utf-8'))],
43+
['', createIgnore().add(await fsExtra.readFile(easIgnorePath, 'utf-8'))],
4344
];
4445
return;
4546
}
@@ -57,7 +58,7 @@ export class Ignore {
5758
ignoreFilePaths.map(async filePath => {
5859
return [
5960
filePath.slice(0, filePath.length - GITIGNORE_FILENAME.length),
60-
createIgnore().add(await fs.readFile(path.join(this.rootDir, filePath), 'utf-8')),
61+
createIgnore().add(await fsExtra.readFile(path.join(this.rootDir, filePath), 'utf-8')),
6162
] as const;
6263
})
6364
);
@@ -77,7 +78,10 @@ export class Ignore {
7778
export async function makeShallowCopyAsync(src: string, dst: string): Promise<void> {
7879
const ignore = new Ignore(src);
7980
await ignore.initIgnoreAsync();
80-
await fs.copy(src, dst, {
81+
await fs.cp(src, dst, {
82+
recursive: true,
83+
// Preserve symlinks without re-resolving them to their original targets
84+
verbatimSymlinks: true,
8185
filter: (srcFilePath: string) => {
8286
if (srcFilePath === src) {
8387
return true;

0 commit comments

Comments
 (0)