diff --git a/bin/lessc b/bin/lessc index 4907bc36f..8f31be4a8 100755 --- a/bin/lessc +++ b/bin/lessc @@ -316,8 +316,8 @@ function printUsage() { } if (sourceMapOptions.sourceMapRootpath === undefined) { - var pathToMap = path.dirname(sourceMapFileInline ? output : sourceMapOptions.sourceMapFullFilename), - pathToInput = path.dirname(sourceMapOptions.sourceMapInputFilename); + var pathToMap = path.dirname(sourceMapFileInline ? output : sourceMapOptions.sourceMapFullFilename || '.'), + pathToInput = path.dirname(sourceMapOptions.sourceMapInputFilename || '.'); sourceMapOptions.sourceMapRootpath = path.relative(pathToMap, pathToInput); }