Commit 848d3114 authored by Maxime Perrotin's avatar Maxime Perrotin

Fix path issue when calling opengeode

parent c37a4b21
......@@ -55,14 +55,16 @@ namespace eval opengeode {
set aadlId [string tolower $aadlId 0 end]
set fileBaseName [file normalize "[pwd]/$aadlId" ]
if { $errNumb == 0 && [file exists $fileBaseName ] } {
set pathBefore [pwd]
if { [auto_execok opengeode] == "" } {
set errNumb -1
set msg [list "Error in execution of \"opengeode system_structure.pr ${fileBaseName}/${aadlId}.pr: unknown file opengeode" ]
set msg [list "opengeode not found in PATH" ]
} else {
ToolsOthers::execAsynchronouslyWithResponse [list "[auto_execok opengeode] ${fileBaseName}/system_structure.pr ${fileBaseName}/${aadlId}.pr " \
"[auto_execok opengeode] --toAda ${fileBaseName}/system_structure.pr ${fileBaseName}/${aadlId}.pr" ] \
"::opengeoderes" "Opengeode error report" "The execution of opengeode stopped with error"
cd ${fileBaseName}
ToolsOthers::execAsynchronouslyWithResponse [list "[auto_execok opengeode] system_structure.pr ${aadlId}.pr " ] \
"::opengeoderes" "OpenGEODE error report" "The execution of opengeode stopped with error"
}
cd $pathBefore
} elseif { $errNumb != 0 } {
set errNumb -1
set msg [list "Error in execution of \"taste-generate-skeletons $aadlFilePath\": $errMsg" ]
......
......@@ -55,14 +55,16 @@ namespace eval opengeode {
set aadlId [string tolower $aadlId 0 end]
set fileBaseName [file normalize "[pwd]/$aadlId" ]
if { $errNumb == 0 && [file exists $fileBaseName ] } {
set pathBefore [pwd]
if { [auto_execok opengeode] == "" } {
set errNumb -1
set msg [list "Error in execution of \"opengeode system_structure.pr ${fileBaseName}/${aadlId}.pr: unknown file opengeode" ]
set msg [list "opengeode not found in PATH" ]
} else {
ToolsOthers::execAsynchronouslyWithResponse [list "[auto_execok opengeode] ${fileBaseName}/system_structure.pr ${fileBaseName}/${aadlId}.pr " \
"[auto_execok opengeode] --toAda ${fileBaseName}/system_structure.pr ${fileBaseName}/${aadlId}.pr" ] \
"::opengeoderes" "Opengeode error report" "The execution of opengeode stopped with error"
cd ${fileBaseName}
ToolsOthers::execAsynchronouslyWithResponse [list "[auto_execok opengeode] system_structure.pr ${aadlId}.pr " ] \
"::opengeoderes" "OpenGEODE error report" "The execution of opengeode stopped with error"
}
cd $pathBefore
} elseif { $errNumb != 0 } {
set errNumb -1
set msg [list "Error in execution of \"taste-generate-skeletons $aadlFilePath\": $errMsg" ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment