Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

gaze.watched returns an object #2147

Merged
merged 2 commits into from
Nov 11, 2017
Merged

gaze.watched returns an object #2147

merged 2 commits into from
Nov 11, 2017

Conversation

evanfuture
Copy link
Contributor

Since it returns an object, we need to run through the keys, a simple index of isn't enough. This should fix #2139

Since it returns an object, we need to run through the keys, a simple index of isn't enough.  This should fix sass#2139
Copy link
Contributor

@nschonni nschonni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if there is something we can add as a test for this behaviour or not

@nschonni nschonni mentioned this pull request Nov 9, 2017
bin/node-sass Outdated
gaze.add(file);
}
Object.keys(watch).forEach(function (dir) {
if (watch[dir].indexOf(file)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you inverted this behaviour? Should it be

if (watch[dir].indexOf(file) !== -1) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Yes, I totally messed that up when I refactored (in gaze's code where I copied it from, it was set to a variable first). Will fix that right away.

replaces the check I removed in refactoring.
@xzyfer xzyfer merged commit 824fbd5 into sass:master Nov 11, 2017
saper added a commit that referenced this pull request Nov 11, 2017
## Fixes

- Problem with watcher (@evanfuture, #2147)

## Supported Environments

| OS | Architecture | Node |
| --- | --- | --- |
| Windows | x86 & x64 | 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9 |
| OSX | x64 | 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9 |
| Linux* | x86 & x64 | 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9 |
| Alpine | x64 | 4, 6, 7, 8, 9 |
| FreeBSD  10+ | i386 | 4, 6, 8 |
| FreeBSD 10+ | amd64 | 4, 6, 8 |

*Linux support refers to Ubuntu, Debian, and CentOS 5
@saper
Copy link
Member

saper commented Nov 11, 2017

I have prepared v4.6.1 with this change only. @xzyfer @nschonni if everything is okay, I'll push the publish button.

@xzyfer
Copy link
Contributor

xzyfer commented Nov 11, 2017

@saper looks good 👍

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

Successfully merging this pull request may close these issues.

CLI: watch doesnt work after upgrading to 4.6.0 and 4.6.1
4 participants