Skip to content

Commit

Permalink
[Dataset][xs]: when parsing a dataset identifier consider OS - refs d…
Browse files Browse the repository at this point in the history
  • Loading branch information
anuveyatsu committed Apr 20, 2018
1 parent bcb429e commit 8faa87d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,11 @@ const parseDatasetIdentifier = async (path_) => {
let normalizedPath = path_.replace(/\/?datapackage\.json/, '')
normalizedPath = normalizedPath.replace(/\/$/, '')
if (out.type === 'local') {
out.path = path.posix.resolve(normalizedPath)
if (process.platform === 'win32') {
out.path = path.resolve(normalizedPath)
} else {
out.path = path.posix.resolve(normalizedPath)
}
out.name = path.basename(out.path)
} else if (out.type === 'url') {
const urlparts = url.parse(normalizedPath)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data.js",
"version": "0.11.2",
"version": "0.11.3",
"description": "",
"main": "lib/index.js",
"directories": {
Expand Down

0 comments on commit 8faa87d

Please sign in to comment.