-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Conversation
squirrelsc
commented
May 21, 2020
- Reduce error message if deleted folder not exists.
- Reduce unneccessary messages.
- Organize logic better for reinstall scenario.
@@ -51,7 +51,7 @@ else { | |||
$PIP_INSTALL = """$NNI_PYTHON3\python"" -m pip install " | |||
|
|||
if (!(Test-Path $NNI_DEPENDENCY_FOLDER)) { | |||
New-Item $NNI_DEPENDENCY_FOLDER -ItemType Directory | |||
$null = New-Item $NNI_DEPENDENCY_FOLDER -ItemType Directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add $null
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original command, New-Item $NNI_DEPENDENCY_FOLDER -ItemType Directory
, will output command result to console. The default output is like below, if there are a lot of this kind of information, it buries important information. Use $null can put stdout to null pipeline. If there is error, it can show on screen as red text also, not be send to null pipeline.
Directory: D:\temp
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 6/8/2020 11:30 AM test1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
New-Item -ItemType Junction -Path $($NNI_PKG_FOLDER_STATIC) -Target "src\webui\build" | ||
New-Item -ItemType Junction -Path $($NASUI_PKG_FOLDER) -Target "src\nasui\build" | ||
$null = New-Item -ItemType Junction -Path $NNI_PKG_FOLDER -Target "src\nni_manager\dist" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty line.