gruntjs / gruntjs/grunt

grunt.file.read() breaks when path starts with a "#" symbol

Open
#1,264 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.2k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

I have tried to use [this](https://github.com/paazmaya/grunt-trimtrailingspaces) Grunt task, that uses Grunt's `grunt.file.read()` method, and noticed the following issue:
When the given path starts with a "#" symbol (such as "#work/stuff"), the following error is thrown:
`Warning: Unable to read "undefined" file (Error code: ENOENT)`
The original issue with the task could be found [here](https://github.com/paazmaya/grunt-trimtrailingspaces/issues/15).
Grunt 0.4.5
OS X 10.10.1

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure through grunt.file.read() with a path such as "#work/stuff", then trace the Grunt file API handling of that path. Done means paths beginning with "#" are read successfully instead of producing an undefined filename and ENOENT error, with coverage for the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.