Zowe CLI daemon does not start in VSCode PowerShell terminal
search cancel

Zowe CLI daemon does not start in VSCode PowerShell terminal

book

Article ID: 261570

calendar_today

Updated On:

Products

Brightside

Issue/Introduction

Placed  zowe.exe in C:\zowe and add C:\zowe to the start of the PATH variable.

The daemon starts and works in vscode CMD terminal.

However it does not work in the VSCode PowerShell terminal.

 

Environment

Release : 4.0

VSCode 1.75.1

Zowe CLI 7.9.8

Cause

PS F:\> where.exe zowe                                                                                                  

C:\Zowe\zowe
C:\Zowe\zowe.cmd
C:\Zowe\zowe.exe

PowerShell is pointing toward the intended folder for Zowe CLI.

In vscode PowerShell, issue the following command:

(get-command zowe).Path

Output shows a file path ending in ".ps1" - PowerShell is prioritizing the PowerShell script for Zowe commands. This is the reason why Zowe daemon can't satrt in PowerShell. 

Resolution

  • One method to resolve the problem would involve making a new folder in "C:\Zowe", and moving the daemon (zowe.exe) into that folder, for example:

    "C:\Zowe\zowe.exe" --> "C:\Zowe\daemon\zowe.exe"
    (moved "zowe.exe" into the new folder "daemon")

    Then, add "C:\Zowe\daemon" path before "C:\Zowe" in PATH environment variable. This will prioritize the daemon for Zowe commands.

  • Another solution would be to change the ".ps1" file extension for the file path that returns in the command output - renaming the "zowe.ps1" file to something like "zowe.ps1.backup" would prevent PowerShell from prioritizing the script.