gh-cli-for-education / gh-edu

A pluggable extension of gh-cli to assist educators and students using GitHub Education
https://github.com/gh-cli-for-education/TFG-2122-Cristo-Garcia-Gonzalez
3 stars 0 forks source link

list of installed plugins: gh edu get -p #9

Closed crguezl closed 2 years ago

crguezl commented 2 years ago

Versions

➜  gh-edu-view git:(main) gh extension list | grep gh-edu
gh edu  gh-cli-for-education/gh-edu 74da8868
gh edu-data gh-cli-for-education/gh-edu-data    d3da62de
gh edu-view gh-cli-for-education/gh-edu-view    1ea9b099
➜  gh-edu-view git:(main) date
viernes, 27 de mayo de 2022, 11:27:38 WEST

Problem

Dos not list the plugins:

➜  gh-edu-view git:(main) gh edu get -p
Builtin commands:
clone
get
install
remove
reset
set
update
External commands:
{
  "view": {
    "originalName": "gh-cli-for-education/gh-edu-view"
  }
}
GGCristo commented 2 years ago

It does work for me Captura de pantalla de 2022-05-27 11-33-43 Most probably, you have installed the plugin using gh extension install instead of gh edu install Please unistall the plugin: gh extension remove edu-data, run gh edu install data and check again

I could check what extensions are installed in gh and add it to the list if it has the gh-edu- prefix. But I don't think that managing 2 different plugins manager is a good idea.

crguezl commented 2 years ago

Yes @GGCristo . My fault.

Seems that I wrongly installed data with gh extension install instead of gh edu install and so the entry in the config file was not updated.

Closing the issue

crguezl commented 2 years ago

De todos modos estoy teniendo problemas seguramente relacionados con los upgrades de las versiones instaladas de gh-edu. Por ejemplo:

➜  2022-06-03-viernes git:(master) ✗ gh edu-view -h
Usage: gh-edu-view [options] [command]

Options:
  -h, --help         display help for command

Commands:
  members [options]
  help [command]     display help for command

Versus:

➜  2022-06-03-viernes git:(master) ✗ gh edu view -h
Usage: gh-edu [options] [command]

Options:
  -h, --help             display help for command

Commands:
  clone [options]        Clone all the repos you want from one organization
  set [options] [value]  Set some values in the configuration file
  get [options]          Show the current default organization
  install <plug-in>      Install plug-in
  update [options]       Update your configuration
  remove <plug-in...>
  reset [options]        Set config in default state.
                         If you are calling this command because of some error in the configuration, please contact a member
                         of the organization
  help [command]         display help for command

Also:

➜  2022-06-03-viernes git:(master) ✗ gh edu data -h
Usage: gh-edu [options] [command]

Options:
  -h, --help             display help for command

Commands:
  clone [options]        Clone all the repos you want from one organization
  set [options] [value]  Set some values in the configuration file
  get [options]          Show the current default organization
  install <plug-in>      Install plug-in
  update [options]       Update your configuration
  remove <plug-in...>
  reset [options]        Set config in default state.
                         If you are calling this command because of some error in the configuration, please contact a member
                         of the organization
  help [command]         display help for command

While:

➜  2022-06-03-viernes git:(master) ✗ gh edu-data -h
node:fs:590
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, open '/Users/casianorodriguezleon/campus-virtual/2122/pl2122/private/evaluacion/examenes/convocatorias/junio/2022-06-03-viernes/../gh-edu/config.json'
    at Object.openSync (node:fs:590:3)
    at Object.readFileSync (node:fs:458:35)
    at file:///Users/casianorodriguezleon/.local/share/gh/extensions/gh-edu-data/data/data.js:7:25
    at ModuleJob.run (node:internal/modules/esm/module_job:198:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:409:24)
    at async loadESM (node:internal/process/esm_loader:85:5)
    at async handleMainPromise (node:internal/modules/run_main:61:12) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/Users/casianorodriguezleon/campus-virtual/2122/pl2122/private/evaluacion/examenes/convocatorias/junio/2022-06-03-viernes/../gh-edu/config.json'
}

Node.js v18.0.0

May be I have to reinstall everything from scratch

@GGCristo