accordproject / ergo

Programming Language for Smart Legal Contracts
https://accordproject.org/projects/ergo
Apache License 2.0
158 stars 55 forks source link

ergo compile issue - Unknown arguments: ./model/model.cto, ./logic/logic.ergo #877

Open ajamestech opened 2 years ago

ajamestech commented 2 years ago

Bug Report 🐛

There is an issue with ergo compile running ergo compile ./model/model.cto ./logic/logic.ergo in the latest version (23) of Ergo obtained through npm install -g @accordproject/ergo-cli or npm install -g @accordproject/ergo-cli@0.23

I tested this on both my Windows and Linux development systems and experienced the same issue.

Expected Behavior

ergo compile to return Compiling Ergo './logic/logic.ergo' -- './logic/logic.js'

Current Behavior

Unknown arguments: ./model/model.cto, ./logic/logic.ergo is returned.

Possible Solution

Steps to Reproduce

  1. npm install -g @accordproject/ergo-cli@0.23 or simply npm install -g @accordproject/ergo-cli verifying its version 23
  2. run ergo compile against the model.cto and logic.ergo (i.e. ergo compile model.cto logic.ergo)

Context (Environment)

Desktop

Detailed Description

NOTE: After reverting to an earlier version as in npm install -g @accordproject/ergo-cli@0.22 the process worked as expected. Running ergo compile model.cto logic.ergo returned Compiling Ergo './logic/logic.ergo' -- './logic/logic.js' as expected.

Possible Implementation