Apm: Disabled packages no longer labelled as "(disabled)" by `apm ls`

Created on 11 Oct 2016  路  4Comments  路  Source: atom/apm

While debugging a hang on Atom startup (in both Stable and Beta, Windows 10 x64), I notice that I no longer see any distinguishing label on _installed but disabled packages_ from apm list.

I see that list should show "(disabled)" on installed but disabled packages?

Currently, I see a tree representation of all core and community packages which are installed on my system regardless of their enabled state.

Otherwise, apm behaves normally. Notably, apm enable / disable (re #358 #400) _do_ correctly move packages to and from the disabledPackages array in config.cson.

(I have not filed a bug for the hang-on-start issue, but have not found a resolution. I suppose it's not impossible that they are related.)

bug

Most helpful comment

@50Wliu this one should probably be labelled as a bug too.

All 4 comments

Some sort of character encoding issue? Line endings being included in the disabled package names?

Can you put some debug prints on https://github.com/atom/apm/blob/master/src/list.coffee#L48 to see why the package name isn't matching anything in the disabled packages array?

In fact, on apm 1.12.5, I think I'm seeing the same thing. I have a package disabled, but it's not displaying as (disabled) in apm list.

Smelling like a bug.

Yep, this line: https://github.com/atom/apm/blob/d7fe2b70f4d43f1869fa1a66c3152f235a5570d8/src/list.coffee#L22

Apparently that needs to go through '*' too: CSON.readFileSync(configPath)?['*']?.core?.disabledPackages

And that catch-everything clause should probably be toned down and apm probably shouldn't be so accommodating about a missing disabledPackages setting. It would be nice if this was causing an error.

@50Wliu this one should probably be labelled as a bug too.

Was this page helpful?
0 / 5 - 0 ratings