liquidapps-io / zeus-sdk

EOSIO & EVM smart contract unit testing suite and API provider
51 stars 24 forks source link

fixed problem with deploy box to ipfs on Mac OSX #13

Closed prcolaco closed 4 years ago

prcolaco commented 4 years ago

This problem kept me from exploring the full potential of zeus-cmd on the DAPP Network hackathon, as I use Mac OSX and it wasn't being able to deploy to IPFS, so I had to find a workaround for that issue... Now I found the problem, so here is the fix. Before, with IPFS running and all set for deploy, the result on Mac was this:

$ zeus deploy box
staging in /var/folders/z4/qx7_sgbj2kx24xb20ljx_n_40000gn/T/zeus119113-98312-1l6xfjl.dwi2
{ Error: exec failed
    at ChildProcess.<anonymous> (/liqdapps/zeus-sdk/zeus-cmd/dist/helpers/_exec.js:73:19)
    at ChildProcess.emit (events.js:189:13)
    at ChildProcess.EventEmitter.emit (domain.js:441:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
  stdout: '',
  stderr:
   'touch: illegal option -- d\nusage:\ntouch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...\n',
  code: 1 }

There is a difference with the touch options between Linux and Mac OSX, so this error... Linux man page: http://man7.org/linux/man-pages/man1/touch.1.html Mac man page: https://ss64.com/osx/touch.html So it could be solved by changing the options, but after looking at the code I understood that that effort could be avoided as I found that the change of time on the file was completely irrelevant, and probably was just code that was left behind from previous logic, so I simply removed it and problem solved... :)

NatPDeveloper commented 4 years ago

Very cool! We've been trying to solve this as well. Will have the person looking into it on our end review this.

NatPDeveloper commented 4 years ago

We're taking a different approach to solve this problem. The deleted items are needed for internal use.

Thank you as always for the contribution.