Skip to content

encoding null returns Buffer on linux but string on windows! #489

@Zibri

Description

@Zibri

                    if (typeof process.env.ComSpec == "undefined") {
                        cmd = "bash";
                        cmdargs = ["-i"]
                    } else {
                        cmd = "cmd.exe";
                        cmdargs = []
                    }


mypty = pty.spawn( cmd, cmdargs, {
                    name: 'xterm-256color',
                    cols: 80,
                    rows: 25,
                    env: process.env,
                    encoding: null
                });

if cmd and cmdargs is bash -i, with encoding:null mypty.on("data") returns a Buffer as it should.
but if running on windows and cmd and cmdargs are CMD.EXE then mypty.on("data") returns a STRING!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bugwindows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions