Skip to content
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 src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { services } from './services/extensionHostServices';
// this method is called when the extension is activated
export function activate(context: vscode.ExtensionContext) {
services.globalState = context.globalState;
services.cliPath = services.workspaceConfigService.tnsPath || services.cliPath;
services.cliPath = 'tns';

const channel = vscode.window.createOutputChannel('NativeScript Extension');

Expand Down
5 changes: 4 additions & 1 deletion src/services/buildService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export class BuildService {

public async processRequest(args: any): Promise<any> {
const tnsPath = services.workspaceConfigService.tnsPath;
const cli = new NativeScriptCli(tnsPath, this._logger);

this._logger.log(`[NSDebugAdapter] Using tns CLI on path '${tnsPath}'\n`);
const tnsPathResolved = (tnsPath !== 'tns' && !path.isAbsolute(tnsPath)) ? path.join(args.appRoot, tnsPath) : tnsPath;
const cli = new NativeScriptCli(tnsPathResolved, this._logger);

const project = args.platform === 'ios' ?
new IosProject(args.appRoot, cli) :
Expand Down