ghaction-upx/node_modules/graceful-readlink/index.js
2020-01-17 09:39:25 +01:00

13 lines
188 B
JavaScript

var fs = require('fs')
, lstat = fs.lstatSync;
exports.readlinkSync = function (p) {
if (lstat(p).isSymbolicLink()) {
return fs.readlinkSync(p);
} else {
return p;
}
};