Skip to content

Commit b20aa08

Browse files
authored
Set from option, logic was wrong (#94)
1 parent 9235319 commit b20aa08

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

index.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -255,18 +255,11 @@ function css (css, file) {
255255

256256
if (file === 'stdin' && output) file = output
257257

258-
if (file !== 'stdin' && output || output || dir || argv.replace) {
259-
options = Object.assign(
260-
{
261-
from: file,
262-
to: output || (
263-
argv.replace
264-
? file
265-
: path.join(dir, path.basename(file))
266-
)
267-
},
268-
config.options
269-
)
258+
// TODO: Unit test this
259+
if (file !== 'stdin') options.from = file
260+
261+
if (output || dir || argv.replace) {
262+
options.to = output || (argv.replace ? file : path.join(dir, path.basename(file)))
270263

271264
if (argv.ext) {
272265
options.to = options.to

0 commit comments

Comments
 (0)