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

improve windows install scripts #2470

Merged
merged 2 commits into from
Jun 10, 2020

Conversation

squirrelsc
Copy link
Member

  1. Reduce error message if deleted folder not exists.
  2. Reduce unneccessary messages.
  3. Organize logic better for reinstall scenario.

@SparkSnail SparkSnail self-requested a review May 22, 2020 08:51
@chicm-ms chicm-ms requested a review from liuzhe-lz June 4, 2020 02:56
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add $null?

Copy link
Member Author

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

Copy link
Contributor

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"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove empty line.

@squirrelsc squirrelsc merged commit 74e5ea9 into microsoft:master Jun 10, 2020
@squirrelsc squirrelsc deleted the windows-install branch June 10, 2020 06:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants