Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

chore(refactor): prefer path.resolve #3751

Merged
merged 1 commit into from
Nov 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ if (argv.help) {
}

if (argv.version) {
console.log('Version ' + require(path.join(__dirname, '../package.json')).version);
console.log('Version ' + require(path.resolve(__dirname, '../package.json')).version);
process.exit(0);
}

Expand Down
4 changes: 2 additions & 2 deletions testapp/scripts/web-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ var env = require('../../spec/environment.js');
var testApp = express();
var DEFAULT_PORT = process.env.HTTP_PORT || env.webServerDefaultPort;
var testAppDir = path.resolve(__dirname, '..');
var defaultAngular = require(path.join(testAppDir, 'ng1/lib/angular_version.js'));
var defaultAngular = require(path.resolve(testAppDir, 'ng1/lib/angular_version.js'));

var argv = optimist.describe('port', 'port').
default('port', DEFAULT_PORT).
describe('ngversion', 'version of AngularJS to use').
default('ngversion', defaultAngular).
argv;

var angularDir = path.join(testAppDir, 'ng1/lib/angular_v' + argv.ngversion);
var angularDir = path.resolve(testAppDir, 'ng1/lib/angular_v' + argv.ngversion);

var main = function() {
var port = argv.port;
Expand Down