Skip to content

Commit 3daccc1

Browse files
authored
Set from option for stdin to process.cwd() + 'stdin' (postcss#115)
Should fix postcss#114; will revert if this causes other issues.
1 parent 097f37a commit 3daccc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ function css (css, file) {
279279
if (file === 'stdin' && output) file = output
280280

281281
// TODO: Unit test this
282-
if (file !== 'stdin') options.from = file
282+
options.from = file === 'stdin' ? path.join(process.cwd(), 'stdin') : file
283283

284284
if (output || dir || argv.replace) {
285285
options.to = output || (argv.replace ? file : path.join(dir, path.basename(file)))

0 commit comments

Comments
 (0)