Skip to content

Commit

Permalink
Fix source map path normalization
Browse files Browse the repository at this point in the history
We need to normalize the entire path, including the root after it's
made absolute.
  • Loading branch information
nex3 committed May 24, 2018
1 parent c2987d4 commit 2d67f3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/executable_options.dart
Expand Up @@ -288,10 +288,10 @@ class ExecutableOptions {
/// Makes [url] absolute or relative (to the directory containing
/// [destination]) according to the `source-map-urls` option.
Uri sourceMapUrl(Uri url, String destination) {
var path = p.normalize(p.fromUri(url));
return p.toUri(_options['source-map-urls'] == 'relative'
var path = p.fromUri(url);
return p.toUri(p.normalize(_options['source-map-urls'] == 'relative'
? p.relative(path, from: p.dirname(destination))
: p.absolute(path));
: p.absolute(path)));
}

/// Returns the value of [name] in [options] if it was explicitly provided by
Expand Down

0 comments on commit 2d67f3d

Please sign in to comment.