the-carlisle-group/Dado

Move ExecuteOnBuild_ in project check up one line.

norberturkiewicz opened this issue · 1 comments

 ExecuteOnBuild_←{
     ⍺←0
     pf←GetProjectFolder ⍺
     c←GetConfigSpace pf
     0=≢pf:1 'Not in a project'
     746::1 ⎕DMX.EM
     m←pf Retrieve ⍵
     f←m.ProjectFolder
     load←{⎕SE.UCMD']acre.OpenProject "',⍵,'" ',⍺,' -track=off -dependencies=off'}
     s←⌽⍎¨(⌽m._ProjectSpace)load¨⌽f
     s.AcreConfig←s.⎕NS m
     _←s∘SetReferences¨s
     p←↑s
     p.AcreConfig.DistFolder←c.DistFolder
     _←CopyUserCommandFile p
     _←p Execute'OnBuild'
     0 'OK'
 }

result is FILE NAME ERROR in GetConfigSpace

                     ∧
      ⎕se.zApps.Dado.Dado.Main.ExecuteOnBuild_''
FILE NAME ERROR: C:/acre.config: Unable to open file ("The system cannot find the file specified.")
ReadConfigFile[5] r←↑⎕NGET ⍵ 1
                     ∧

to

 ExecuteOnBuild_←{
     ⍺←0
     pf←GetProjectFolder ⍺
     0=≢pf:1 'Not in a project'
     c←GetConfigSpace pf
     746::1 ⎕DMX.EM
     m←pf Retrieve ⍵
     f←m.ProjectFolder
     load←{⎕SE.UCMD']acre.OpenProject "',⍵,'" ',⍺,' -track=off -dependencies=off'}
     s←⌽⍎¨(⌽m._ProjectSpace)load¨⌽f
     s.AcreConfig←s.⎕NS m
     _←s∘SetReferences¨s
     p←↑s
     p.AcreConfig.DistFolder←c.DistFolder
     _←CopyUserCommandFile p
     _←p Execute'OnBuild'
     0 'OK'
 }
      ⎕se.zApps.Dado.Dado.Main.ExecuteOnBuild_''
1  Not in a project