You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.
By default in Windows Powershell (Powershell v5.x), the Get-ChildItem command returns all files, including hidden ones.
When moving to Powershell Core (Powershell v7.x), the Get-ChildItem only returns standard files, and not hidden files anymore. To also show hidden files you need to add the -Force switch (there's a -Hidden switch, but this will only show hidden files, which is not the way to go).
This causes an issue where uploading hidden files cannot be done using the Add-DatabricksDBFSFile command, and in our case, breaks our workflow as we regularly upload .env files containing secrets and other environment variables, and we've just switched over from Windows Powershell to Powershell Core.
I've created this PR to add the -Force switch in the Add-DatabricksDBFSFile.ps1 to fix this. It has been tried locally and works like a charm.
Adding the -Force switch in Windows Powershell will not break anything, as it does the exact same thing as in Powershell Core as it does in Windows Powershell.
Thanks, and let me know if there are any concerns with this fix!
The text was updated successfully, but these errors were encountered:
alexpilon666
pushed a commit
to alexpilon666/azure.databricks.cicd.tools
that referenced
this issue
Jun 21, 2022
By default in Windows Powershell (Powershell v5.x), the 'Get-ChildItem' command returns all files, including hidden ones.
When moving to Powershell Core (Powershell v7.x), the 'Get-ChildItem' only returns standard files, and not hidden files anymore. To also show hidden files you need to add the '-Force' switch (there's a '-Hidden' switch, but this will only show hidden files, which is not the way to go).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
By default in Windows Powershell (Powershell v5.x), the
Get-ChildItem
command returns all files, including hidden ones.When moving to Powershell Core (Powershell v7.x), the
Get-ChildItem
only returns standard files, and not hidden files anymore. To also show hidden files you need to add the-Force
switch (there's a-Hidden
switch, but this will only show hidden files, which is not the way to go).This causes an issue where uploading hidden files cannot be done using the
Add-DatabricksDBFSFile
command, and in our case, breaks our workflow as we regularly upload.env
files containing secrets and other environment variables, and we've just switched over from Windows Powershell to Powershell Core.I've created this PR to add the
-Force
switch in theAdd-DatabricksDBFSFile.ps1
to fix this. It has been tried locally and works like a charm.Adding the
-Force
switch in Windows Powershell will not break anything, as it does the exact same thing as in Powershell Core as it does in Windows Powershell.Thanks, and let me know if there are any concerns with this fix!
The text was updated successfully, but these errors were encountered: