From: Edward Delaporte Date: Mon, 7 Oct 2024 16:28:17 +0000 (-0500) Subject: Update with cleaner ways to invoke Powershell in inv X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/commitdiff_plain/cc81207e50b378eb1e71540c66a92e827873bb60?ds=sidebyside Update with cleaner ways to invoke Powershell in inv --- diff --git a/invoke/nvim/tasks.py b/invoke/nvim/tasks.py index e104e36..3adc6f9 100644 --- a/invoke/nvim/tasks.py +++ b/invoke/nvim/tasks.py @@ -1,13 +1,16 @@ from invoke import task import os +# $env:INVOKE_RUN_SHELL='C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' + home = os.path.expanduser('~') config_dir = f"{home}/AppData/Local/nvim" +ps = r'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' @task def status(c): - result = c.run('powershell Get-Command nvim') + result = c.run('Get-Command nvim', shell=ps) print(f"Nvim installed? {result.ok}") print(f"Config dir is {config_dir}") - c.run(f"powershell ls {config_dir}") + c.run(f"ls {config_dir}", shell=ps)