Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/modules/kobiton-cli/pages/cli-commands.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,17 @@ kobiton file push foo.dat @com.company.app:Documents/foo.dat
Pushed 505031 bytes to /data/local/tmp/foo.dat
----

[IMPORTANT]
====
*A refused push fails with a non-zero exit code.*

A device can refuse the destination path. Public cloud and trial devices run a restricted session that limits writes to the permitted directories, and any device refuses a write to a path it does not permit. When a push is refused, nothing is written to the device. See <<adb-shell-restricted-sessions,restricted sessions>>.

A refused push reports the reason and exits with a non-zero status. A successful push is unaffected and exits `0`.

Earlier CLI versions reported a refused push as `Pushed 505031 bytes` and exited `0`. Update to the latest CLI version before relying on the exit code in a CI/CD pipeline. See xref:set-up-cli.adoc[].
====

=== `file pull`

Pull a file or directory from the device to a local path.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Release-note draft for KOB-54477. Staged as a partial, so it is not published.
//
// Docs team: fold this entry into the release page for the version that ships
// the change, then delete this file. The release version and date are not yet
// assigned, and the change had not shipped at the time of drafting.

=== Kobiton CLI reports refused file pushes

`kobiton file push` now reports a refused push and exits with a non-zero exit code. Previously a refused push printed `Pushed N bytes` and exited `0`, so a pipeline recorded a transfer that never reached the device.

A push is refused when the device does not permit writing to the destination path. Public cloud and trial devices run a restricted session that limits writes to the permitted directories.

This is a behavior change that affects automation workflows relying on CLI exit codes.

*Highlights*

- `file push` exits non-zero when the device refuses the destination path
- The CLI reports the reason for the refusal instead of a success message
- Successful pushes are unaffected
- CI/CD pipelines that check exit codes now detect refused pushes

*Availability*

Requires the latest Kobiton CLI. Download it from the Downloads icon in the left navigation of Kobiton Portal. Earlier CLI versions continue to report a refused push as successful.
Loading