angularjs - How to define same path in all machins in Ubuntu using javascript for protractor -


i want define same path in ubuntu in windows(user.dir) want soulution

currently using :

projectpath="/home/local/nexteducation/**anandgoudp**/workspace/nexterp 

which static, in place of anandgoudp want user name in meching have logged in.

using shell command whoami can logged in user name. execute shell command using node js, can use shelljs npm module.

example:

var shell = require('shelljs'); var projectpath="/home/local/nexteducation/{{username}}/workspace/nexterp"; var currentusername = shell.exec("whoami").stdout.replace("\n",""); projectpath= projectpath.replace("{{username}}",currentusername); 

Comments

Popular posts from this blog

minify - Minimizing css files -

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -