Skip to content

Missing stderr outputs #571

@KojiNakamaru

Description

@KojiNakamaru

I have checked that the SDK documentation doesn't solve my issue.

  • Yes I've checked them.

I have checked that the API documentation doesn't solve my issue.

  • Yes I've checked them.

I have checked that the Box Developer Forums doesn't solve my issue.

  • Yes I've checked them.

I have searched Issues in this repo and my issue isn't already reported.

  • Yes I've checked them.

Describe the bug

API request errors, for example, are missing on stderr as process.stderr.setEncoding('utf8') is incorrectly called as below:

process.stderr.setEncoding('utf8');

process.stderr doesn't have setEncoding so this line should be removed.

Expected behavior

API request errors are correctly emitted on stderr.

Steps to reproduce

Upload the same file twice:

$ box files:upload --parent-id=0 foo.txt > 1 2> 2
$ box files:upload --parent-id=0 foo.txt > 1 2> 2
$ cat 2

where 2 should have the entry like below, but doesn't.

Conflicts:
    Type: file
    ID: '.............'
    File Version:
        Type: file_version
        ID: '.............'
        SHA1: ........................................
    Sequence ID: '0'
    ETag: '0'
    SHA1: ........................................
    Name: foo.txt

Authentication method used in your application

User Authentication (OAuth 2.0)

App Access Level

App Access Only

What is Box CLI Version and Node used?

@box/cli/4.0.1 darwin-arm64 node-v22.14.0

What is your Operating System Version?

macOS Sequoia 15.3.2

Metadata

Metadata

Labels

bugneeds-triageAdded to new issues to mark that they require taking action

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions