databricks-cli/cmd
Denis Bilenko d282f33a22
Append newline to "-o json" for validate/summary/run (#2326)
## Changes
- Insert newline after rendering indented JSON in bundle
validate/summary/run.
- This prevents "No newline at end of file" message in various cases,
for example when switching between recording raw output of the command
to output processed by jq, since jq does add a newline or when running
diff in acceptance tests.

## Tests
Manually running validate:

```
~/work/dabs_cuj_brickfood % ../cli/cli-main bundle validate -o json | tail -n 2  # without change
Error: root_path must start with '~/' or contain the current username to ensure uniqueness when using 'mode: development'

  }
}%
~/work/dabs_cuj_brickfood % ../cli/cli bundle validate -o json | tail -n 2  # with change
Error: root_path must start with '~/' or contain the current username to ensure uniqueness when using 'mode: development'

  }
}
~/work/dabs_cuj_brickfood %
```

Via #2316 -- see cleaner output there.
2025-02-10 14:00:49 +01:00
..
account Bump github.com/databricks/databricks-sdk-go from 0.56.1 to 0.57.0 (#2321) 2025-02-10 12:50:52 +00:00
api Bump github.com/databricks/databricks-sdk-go from 0.55.0 to 0.56.1 (#2238) 2025-01-27 13:11:07 +00:00
auth Add doc string for the `auth token` command (#2302) 2025-02-07 11:51:37 +00:00
bundle Append newline to "-o json" for validate/summary/run (#2326) 2025-02-10 14:00:49 +01:00
configure Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
fs Consolidate test helpers for `io/fs` (#1906) 2024-11-15 15:37:21 +00:00
labs Add support for extras to the labs CLI (#2288) 2025-02-05 13:24:15 +00:00
root Always print warnings and errors; clean up format (#2213) 2025-02-07 11:29:40 +00:00
sync Enable perfsprint linter and apply autofix (#2071) 2025-01-07 10:49:23 +00:00
version Add usage string when command fails with incorrect arguments (#1276) 2024-03-12 14:12:34 +00:00
workspace Bump github.com/databricks/databricks-sdk-go from 0.56.1 to 0.57.0 (#2321) 2025-02-10 12:50:52 +00:00
cmd.go Fix duplicate "apps" entry in help output (#2191) 2025-01-20 16:02:29 +00:00