databricks-cli/internal
shreyas-goenka 2c0d06715c
Fix windows style file paths in fs cp command (#1118)
## Changes
Copying a local file in windows to remote directory in DBFS would fail
if the path was specified as a windows style path (compared to a UNIX
style path). This PR fixes that.

Note, UNIX style paths will continue to work because `filepath.Base`
respects both `/` and `\` as file separators. See: `IsPathSeparator` in
https://go.dev/src/os/path_windows.go.

Fixes issue: https://github.com/databricks/cli/issues/1109.

## Tests
Integration test and manually
```
C:\Users\shreyas.goenka>Desktop\cli.exe fs cp .\Desktop\foo.txt dbfs:/Users/shreyas.goenka@databricks.com
.\Desktop\foo.txt -> dbfs:/Users/shreyas.goenka@databricks.com/foo.txt

C:\Users\shreyas.goenka>Desktop\cli.exe fs cat  dbfs:/Users/shreyas.goenka@databricks.com/foo.txt
hello, world
````
2024-01-11 18:49:42 +00:00
..
acc Update Go SDK to 0.23.0 and use custom marshaller (#772) 2023-10-16 06:56:06 +00:00
build Make default dev semver a const (#891) 2023-10-19 18:56:54 +00:00
bundle Pass parameters to task when run with `--python-params` and `python_wheel_wrapper` is true (#1037) 2023-12-01 10:35:20 +00:00
mocks Correctly overwrite local state if remote state is newer (#1008) 2023-11-24 11:15:46 +00:00
python Added test to submit and run various Python tasks on multiple DBR versions (#806) 2023-10-03 11:18:55 +00:00
testdata Fix integration test asserting errors on unknown template parameters (#977) 2023-11-10 11:05:32 +00:00
testjsons Update Go SDK to 0.23.0 and use custom marshaller (#772) 2023-10-16 06:56:06 +00:00
testutil Run tests to verify backend tag validation behavior (#814) 2023-09-29 08:38:06 +00:00
alerts_test.go Update alerts command integration test (#512) 2023-06-22 10:30:52 +02:00
api_test.go Rename bricks -> databricks (#389) 2023-05-16 18:35:39 +02:00
clusters_test.go Do not generate prompts for certain commands (#438) 2023-06-05 19:38:45 +02:00
filer_test.go Added test to submit and run various Python tasks on multiple DBR versions (#806) 2023-10-03 11:18:55 +00:00
fs_cat_test.go Added test to submit and run various Python tasks on multiple DBR versions (#806) 2023-10-03 11:18:55 +00:00
fs_cp_test.go Fix windows style file paths in fs cp command (#1118) 2024-01-11 18:49:42 +00:00
fs_ls_test.go Added test to submit and run various Python tasks on multiple DBR versions (#806) 2023-10-03 11:18:55 +00:00
fs_mkdir_test.go Added test to submit and run various Python tasks on multiple DBR versions (#806) 2023-10-03 11:18:55 +00:00
fs_rm_test.go Added test to submit and run various Python tasks on multiple DBR versions (#806) 2023-10-03 11:18:55 +00:00
git_clone_test.go Remove resolution of repo names against the Databricks Github account (#940) 2023-11-01 13:02:06 +00:00
helpers.go Make Cobra runner compatible with testing interactive flows (#957) 2023-11-07 19:06:27 +00:00
init_test.go Error when unknown keys are encounters during template execution (#766) 2023-09-14 15:53:20 +00:00
jobs_test.go Update Go SDK to 0.23.0 and use custom marshaller (#772) 2023-10-16 06:56:06 +00:00
locker_test.go Added test to submit and run various Python tasks on multiple DBR versions (#806) 2023-10-03 11:18:55 +00:00
repos_test.go Add provider detection to the repos create command (#528) 2023-06-27 14:17:13 +02:00
secrets_test.go Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00
storage_credentials_test.go Fixed storage-credentials list command in text output (#1094) 2024-01-02 07:24:51 +00:00
sync_test.go Refactor change computation for sync (#785) 2023-10-03 13:47:46 +00:00
tags_test.go Run tests to verify backend tag validation behavior (#814) 2023-09-29 08:38:06 +00:00
version_test.go Use cmdio in version command for `--output` flag (#419) 2023-06-01 12:03:22 +02:00
workspace_test.go Fix workspace import test (#844) 2023-10-06 18:09:56 +00:00