Skip to content

Throwing exception when specifying WatchPath without WatchFiles #8

Closed
@lijunle

Description

@lijunle

When specifying WatchPath without WatchFiles, it will default to null. Then, it throws from here:

public IEnumerable<string> Files
{
    get {  return _watchedFiles; }
    set { _watchedFiles = new HashSet<string>(value.Select(name => name.ToLowerInvariant())); } // <-- value is null, stuck!
}

Part of call stack:

[ArgumentNullException: Value cannot be null.
Parameter name: source]
   System.Linq.Enumerable.Select(IEnumerable`1 source, Func`2 selector) +4088895
   JSPool.FileWatcher.set_Files(IEnumerable`1 value) +143
   JSPool.JsPool.InitializeWatcher() +77
   JSPool.JsPool..ctor(JsPoolConfig config) +218

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions