mirror of
https://github.com/crazy-max/ghaction-upx.git
synced 2024-11-25 11:46:09 -07:00
13 lines
188 B
JavaScript
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;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
|