Microsoft/vscode

Ubuntu `lxc profile show default > default.yml'` on zsh fails to redirect

Open

#110.281 aperta il 10 nov 2020

Vedi su GitHub
 (4 commenti) (0 reazioni) (1 assegnatario)TypeScript (10.221 fork)batch import
bughelp wantedlinuxsnap

Metriche repository

Star
 (74.848 star)
Metriche merge PR
 (Merge medio 11h 43m) (1000 PR mergiate in 30 g)

Descrizione

Issue Type: Bug

From settings select shell /bin/zsh or /usr/bin/zsh

then if in the vscode terminal, I redirect output of lxc profile I get an empty file. This is true for the snap installs of both code and code-insiders

% lxc profile show default > t1.yml
% wc t1.yml
0 0 0 t1.yml

If I do this same operation in a normal ubuntu 20.04 terminal I get the expected result:

% lxc profile show default > t1.yml
% wc t1.yml
 14  26 209 t1.yml

This file has the expected output.

% cat t1.yml                  
config: {}
description: Default LXD profile
devices:
  eth0:
    name: eth0
    network: lxdbr0
    type: nic
  root:
    path: /
    pool: default
    type: disk
name: default
used_by:
- /1.0/instances/fossa

whereas a simple redirect seems to work in the vscode terminal:

% ls > ls.txt                      
[0] % wc ls.txt                 
  28   28 1151 ls.txt

fails in vscode shell set to /usr/bin/bash too:

$ lxc profile show default > t1.yml
$ wc t1.yml 
> 0 0 0 t1.yml

I reported this on the container users forum too - https://discuss.linuxcontainers.org/t/lxc-redirecting-profile-into-text-file-fails-identified-as-vscode-terminal-problem/9435

VS Code version: Code - Insiders 1.52.0-insider (24b28f57be22fe3029cb17a1dd72d8d9c2d6468b, 2020-11-06T05:40:12.937Z) OS version: Linux x64 5.4.0-52-generic snap

Item Value
CPUs Intel(R) Xeon(R) CPU E3-1245 v3 @ 3.40GHz (8 x 3508)
GPU Status 2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offopengl: enabled_onprotected_video_decode: unavailable_offrasterization: disabled_softwareskia_renderer: enabled_onvideo_decode: unavailable_offvulkan: disabled_offwebgl: enabledwebgl2: enabled
Load (avg) 0, 0, 1
Memory (System) 15.42GB (0.23GB free)
Process Argv . --no-sandbox --crash-reporter-id 446f8467-2185-4e65-b6f3-71361ea528a8
Screen Reader no
VM 50%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11

Guida contributor