Skip to content

Incorrectly documented default for derefSymlinks #1803

Open
@Bluenix2

Description

@Bluenix2

Expected Behavior

According to the documentation for derefSymlinks, the default value is true:

packager/src/types.ts

Lines 356 to 362 in 34f8857

/**
* Whether symlinks should be dereferenced during the copying of the application source.
* Defaults to `true`.
*
* **Note:** `derefSymlinks` will have no effect if the {@link prebuiltAsar} option is set.
*/
derefSymlinks?: boolean;

Actual Behavior

However, as we can see by the call to fs-extra, there is no default value used which means that we rely on their default value:

packager/src/platform.ts

Lines 168 to 171 in 34f8857

await fs.copy(this.opts.dir, this.originalResourcesAppDir, {
filter: userPathFilter(this.opts),
dereference: this.opts.derefSymlinks,
});

As a result, the actual default value becomes false:

dereference <boolean>: dereference symlinks, default is false.

https://github.com/jprichardson/node-fs-extra/blob/master/docs/copy.md

To Reproduce

Package a repository with symlinks, for example due to usage of workspaces. The final build will also contain symlinks inside of its node_modules/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions