[brick] add errored contract to watch list
@@ -124,6 +124,11 @@ func (c *deployContract) Run(args string) (string, error) {
contract.NewRawLuaTxDefBig(accountName, contractName, amount, string(defByte)).Constructor(constuctorArg),
)
+ if enableWatch && !strings.HasPrefix(defPath, "http") {
+ absPath, _ := filepath.Abs(defPath)
+ watcher.Add(absPath)
+ }
+
if err != nil {
return "", err
}
@@ -131,10 +136,5 @@ func (c *deployContract) Run(args string) (string, error) {
Index(context.ContractSymbol, contractName)
Index(context.AccountSymbol, contractName)
- if enableWatch && !strings.HasPrefix(defPath, "http") {
- absPath, _ := filepath.Abs(defPath)
- watcher.Add(absPath)
- }
-
return "deploy a smart contract successfully", nil
}
