mirror of
https://github.com/github/codeql-action.git
synced 2026-05-17 00:30:27 +00:00
18 lines
400 B
JavaScript
18 lines
400 B
JavaScript
'use strict';
|
|
|
|
var path = require('path');
|
|
|
|
/**
|
|
* A utility normalise a path.
|
|
*
|
|
* The path is first converted to an absolute one,
|
|
* then any Windows-style path separators
|
|
* are converted to Unix-style ones.
|
|
*
|
|
* @param {String} p A path to normalise.
|
|
* @return {String} The normalised path.
|
|
*/
|
|
module.exports = function(p) {
|
|
return path.resolve(p).replace(/\\/g,'/');
|
|
};
|