{"action":"created","issue":{"url":"https://api.github.com/repos/sass/node-sass/issues/425","labels_url":"https://api.github.com/repos/sass/node-sass/issues/425/labels{/name}","comments_url":"https://api.github.com/repos/sass/node-sass/issues/425/comments","events_url":"https://api.github.com/repos/sass/node-sass/issues/425/events","html_url":"https://github.com/sass/node-sass/issues/425","id":43348114,"number":425,"title":"Wrong path used for sourceMap","user":{"login":"halfdan","id":176576,"avatar_url":"https://avatars.githubusercontent.com/u/176576?v=3","gravatar_id":"","url":"https://api.github.com/users/halfdan","html_url":"https://github.com/halfdan","followers_url":"https://api.github.com/users/halfdan/followers","following_url":"https://api.github.com/users/halfdan/following{/other_user}","gists_url":"https://api.github.com/users/halfdan/gists{/gist_id}","starred_url":"https://api.github.com/users/halfdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halfdan/subscriptions","organizations_url":"https://api.github.com/users/halfdan/orgs","repos_url":"https://api.github.com/users/halfdan/repos","events_url":"https://api.github.com/users/halfdan/events{/privacy}","received_events_url":"https://api.github.com/users/halfdan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2014-09-21T22:50:36Z","updated_at":"2015-09-24T18:42:01Z","closed_at":"2014-10-22T08:24:33Z","body":"This commit seems to break the path used in sourceMap generation: https://github.com/sass/node-sass/commit/fd6a201dff36a75e6b0658ba4051e44edd3c38d6\r\n\r\nWe're using `node-sass` and `grunt-sass` for Ghost with the following setup:\r\n\r\n```\r\n// ### grunt-sass\r\n// compile sass to css\r\nsass: {\r\n    compress: {\r\n        options: {\r\n            style: 'compressed',\r\n            sourceMap: true\r\n        },\r\n        files: [\r\n            { dest: 'core/client/assets/css/<%= pkg.name %>.min.css', src: 'core/client/assets/sass/screen.scss' },\r\n            { dest: 'core/client/docs/dist/css/<%= pkg.name %>.min.css', src: 'core/client/assets/sass/screen.scss' }\r\n        ]\r\n    }\r\n},\r\n```\r\n\r\nThis however leads to the following error:\r\n\r\n```\r\nRunning \"sass:compress\" (sass) task\r\nWarning: ENOENT, open '/home/vagrant/code/Ghost/core/client/assets/css/core/client/assets/css/ghost.min.css.map' Use --force to continue.\r\n```\r\n\r\n---\r\n\r\nThe two lines used in `sass.js` generate that path:\r\n\r\n```\r\ndir = path.dirname(options.outFile); // Contains the full path to the outfile\r\nsourceMapFile = path.resolve(dir, options.sourceMap); // sourceMap also contains the full path\r\n```"},"comment":{"url":"https://api.github.com/repos/sass/node-sass/issues/comments/143015670","html_url":"https://github.com/sass/node-sass/issues/425#issuecomment-143015670","issue_url":"https://api.github.com/repos/sass/node-sass/issues/425","id":143015670,"user":{"login":"glassdimly","id":1361104,"avatar_url":"https://avatars.githubusercontent.com/u/1361104?v=3","gravatar_id":"","url":"https://api.github.com/users/glassdimly","html_url":"https://github.com/glassdimly","followers_url":"https://api.github.com/users/glassdimly/followers","following_url":"https://api.github.com/users/glassdimly/following{/other_user}","gists_url":"https://api.github.com/users/glassdimly/gists{/gist_id}","starred_url":"https://api.github.com/users/glassdimly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glassdimly/subscriptions","organizations_url":"https://api.github.com/users/glassdimly/orgs","repos_url":"https://api.github.com/users/glassdimly/repos","events_url":"https://api.github.com/users/glassdimly/events{/privacy}","received_events_url":"https://api.github.com/users/glassdimly/received_events","type":"User","site_admin":false},"created_at":"2015-09-24T18:42:01Z","updated_at":"2015-09-24T18:42:01Z","body":"Alright, I made a simple test to reproduce and thereby clarified things.\r\n\r\nThe actual bug/functionality here is that node-sass attempts to process @import relative to the current directory rather than from the directory of the file.\r\n\r\nhttps://github.com/glassdimly/sass-bug-test\r\n\r\n```\r\n$ cat sasstest/test.scss | node-sass\r\n{\r\n  \"message\": \"file to import not found or unreadable: test_import\\nCurrent dir: \",\r\n  \"column\": 9,\r\n  \"line\": 6,\r\n  \"file\": \"stdin\",\r\n  \"status\": 1\r\n}\r\n$ cd sasstest/\r\n$ cat test.scss | node-sass\r\n.test .test-indent {\r\n  font-weight: bold; }\r\n\r\n.test_import {\r\n  display: none; }\r\n\r\n$ \r\n```\r\n"}}