radareorg/radare2-pm

Cannot use $dec alias

guivc opened this issue · 2 comments

guivc commented
/home/vagrant/.local/share/radare2/r2pm/git/r2retdec/node_modules/r2pipe/index.js:403
    const ls = proc.spawn(this.r2bin, ['-qc.:' + port].concat(...opts).concat(file));
                                                              ^^^

SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/vagrant/.local/share/radare2/r2pm/git/r2retdec/r2retdec.js:1:78)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)

alias:

vagrant@ubuntu-xenial:/vagrant/test$ cat ~/.radare2rc 
$dec=#!pipe node /home/vagrant/.local/share/radare2/r2pm/git//r2retdec/r2retdec.js

radare:

vagrant@ubuntu-xenial:/vagrant/test$ r2 -v
radare2 2.6.0-git 18219 @ linux-x86-64 git.2.5.0-297-gefda76c
commit: efda76cc18f164dce2e468bbe095b6f0c6e5a43a build: 2018-05-20__01:20:18

path to the decompiler:

vagrant@ubuntu-xenial:/vagrant/test$ cat ~/.r2retdec 
/opt/retdec/bin/retdec-decompiler.sh

Asciinema:
asciicast

How I'm supposed to use it?

guivc commented

thank you @radare , I thought that I had an updated version of nodejs, but not.
I'v just upgraded it and it works! 👍