Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing test demonstrating CWD "bleed through" #42

Closed
wants to merge 1 commit into from
Closed

Failing test demonstrating CWD "bleed through" #42

wants to merge 1 commit into from

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Apr 16, 2021

The various FS APIs that are wrapped do not properly scope requests to the input source directories.

For example, given this directory structure:

├── bar
│   └── baz
├── foo
└── qux

If the current working directory is the directory above, the following returns the incorrect result:

let merger = new FSMerge(['bar', 'qux');
merger.fs.existsSync('foo');

// -> currently returns `true`, but should obviously be `false

If ran from a working directory that did not have a foo/ folder, it would return the correct result.

References:

The various FS APIs that are wrapped do not properly scope requests to
the input source directories.

For example, given this directory structure:

```
├── bar
│   └── baz
├── foo
└── qux
```

If the current working directory is the directory above, the following
returns the incorrect result:

```
let merger = new FSMerge(['bar', 'qux');
merger.fs.existsSync('foo');

// -> currently returns `true`, but should obviously be `false
```

If ran from a working directory that did not have a `foo/` folder, it
would return the correct result.
@rwjblue rwjblue closed this Apr 16, 2021
@rwjblue
Copy link
Member Author

rwjblue commented Apr 16, 2021

(made from the wrong branch 😭, replaced by follow up PR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant