Repository: conda/conda

Issue:
Space in path breaks powershell (conda >=4.6.x)
<!--
Hi!  Read this; it's important.

This is an issue tracker for conda -- the package manager.  File feature requests
for conda here, as well as bug reports about something conda has messed up.

If your issue is a bug report for:
  * a specific conda package from Anaconda ('defaults' channel):
      ==> file at https://github.com/ContinuumIO/anaconda-issues
  * a specific conda package from conda-forge:
      ==> file at the corresponding feedstock under https://github.com/conda-forge
  * repo.anaconda.com access and service:
      ==> file at https://github.com/ContinuumIO/anaconda-issues
  * anaconda.org access and service:
      ==> file at https://anaconda.org/contact/report
  * commands under 'conda build':
      ==> file at https://github.com/conda/conda-build
  * commands under 'conda env':
      ==> please file it here!
  * all other conda commands that start with 'conda':
      ==> please file it here!

If you continue on,

   **please include all requested information below.**

If a maintainer determines the information is required to understand 
your issue, and if it is not provided, your issue may be
closed automatically.

-->

## Current Behavior
<!-- What actually happens?
     If you want to include console output, please use "Steps to Reproduce" below. -->
Setup miniconda to a path with space in it. Update conda, run `conda --init`

### Steps to Reproduce
<!-- If the current behavior is a bug, please provide specific, minimal steps to independently reproduce.
     Include the exact conda commands that reproduce the issue and their output between the ticks below. -->
```
C:\Windows\system32>powershell
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

& : The term 'C:\Users\Wani\scratch\mc' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\Wani\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:4 char:4
+ (& C:\Users\Wani\scratch\mc 3\Scripts\conda.exe "shell.powershell" "h ...
+    ~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\Wani\scratch\mc:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Loading personal and system profiles took 849ms.
```


## Expected Behavior
<!-- What do you think should happen? -->
The profile file written by conda init shouldn't be incorrect.




Discussion:

Resolving patch:
diff --git a/conda/core/initialize.py b/conda/core/initialize.py
--- a/conda/core/initialize.py
+++ b/conda/core/initialize.py
@@ -1246,7 +1246,7 @@ def _powershell_profile_content(conda_prefix):
     conda_powershell_module = dals("""
     #region conda initialize
     # !! Contents within this block are managed by 'conda init' !!
-    (& {conda_exe} "shell.powershell" "hook") | Out-String | Invoke-Expression
+    (& "{conda_exe}" "shell.powershell" "hook") | Out-String | Invoke-Expression
     #endregion
     """.format(conda_exe=conda_exe))
 


Test patch: