add lock messages

This commit is contained in:
chrislu
2021-12-10 13:24:38 -08:00
parent 991a3dca0d
commit a2d3f89c7b
28 changed files with 146 additions and 128 deletions

View File

@@ -70,11 +70,12 @@ func (ce *CommandEnv) isDirectory(path string) bool {
}
func (ce *CommandEnv) confirmIsLocked() error {
func (ce *CommandEnv) confirmIsLocked(args []string) error {
if ce.locker.IsLocking() {
return nil
}
ce.locker.SetMessage(fmt.Sprintf("%v", args))
return fmt.Errorf("need to run \"lock\" first to continue")