Skip to content

Commit

Permalink
#1467 Fix repl (#1468)
Browse files Browse the repository at this point in the history
* #1467 Use realPath to get resolved path of symlink

Signed-off-by: NivedhaSenthil <[email protected]>

* Bump up version to 1.0.21

Signed-off-by: NivedhaSenthil <[email protected]>
  • Loading branch information
NivedhaSenthil authored Sep 1, 2020
1 parent ecc4bd9 commit d1128c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
9 changes: 2 additions & 7 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ const Module = require('module');
const nodeURL = require('url');
const path = require('path');
const { spawnSync } = require('child_process');
const { readFileSync, readlinkSync, existsSync, lstatSync } = require('fs');

function resolveSymlink(p) {
var stats = lstatSync(p);
return stats.isSymbolicLink() ? resolveSymlink(readlinkSync(p)) : p;
}
const { readFileSync, existsSync, realpathSync } = require('fs');

module.exports.removeQuotes = (textWithQuotes, textWithoutQuotes) => {
return textWithQuotes
Expand All @@ -25,7 +20,7 @@ module.exports.symbols = {
module.exports.isTaikoRunner = (path) => {
try {
if (!path.includes('taiko.js')) {
const link = resolveSymlink(path);
const link = realpathSync(path);
return link && link.includes('taiko.js');
}
return path && path.includes('taiko.js');
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json.schemastore.org/package",
"name": "taiko",
"version": "1.0.20",
"version": "1.0.21",
"description": "Taiko is a Node.js library for automating Chromium based browsers",
"main": "bin/taiko.js",
"bin": {
Expand Down

0 comments on commit d1128c9

Please sign in to comment.