Do not replace delimiter " by ' inside a command string, round 2.

This commit is contained in:
jean-pierre charras 2021-11-05 18:28:21 +01:00
parent 6aa7602c32
commit 2f22b9dd81
1 changed files with 9 additions and 4 deletions

View File

@ -57,11 +57,14 @@ BOM_GENERATOR_HANDLER::BOM_GENERATOR_HANDLER( const wxString& aFile )
// python <script_path>/script.py // python <script_path>/script.py
// and *not* python <script_path>\script.py // and *not* python <script_path>\script.py
// Otherwise the script does not find some auxiliary pythons scripts needed by this script // Otherwise the script does not find some auxiliary pythons scripts needed by this script
int quote = '"';
if( extension == "xsl" ) if( extension == "xsl" )
{ {
m_info = readHeader( "-->" ); m_info = readHeader( "-->" );
m_cmd = wxString::Format( "xsltproc -o '%%O%s' '%s' '%%I'", m_cmd = wxString::Format( "xsltproc -o %c%%O%s%c %c%s%c %c%%I%c",
getOutputExtension( m_info ), m_file.GetFullPath() ); quote, getOutputExtension( m_info ), quote,
quote, m_file.GetFullPath(), quote, quote, quote );
} }
else if( extension == "py" ) else if( extension == "py" )
{ {
@ -76,8 +79,10 @@ BOM_GENERATOR_HANDLER::BOM_GENERATOR_HANDLER( const wxString& aFile )
if( interpreter.IsEmpty() ) if( interpreter.IsEmpty() )
interpreter = wxT( "python" ); interpreter = wxT( "python" );
m_cmd = wxString::Format( "%s '%s' '%%I' '%%O%s'", interpreter, m_file.GetFullPath(), m_cmd = wxString::Format( "%s %c%s%c %c%%I%c %c%%O%s%c",
getOutputExtension( m_info ) ); quote, interpreter, quote,
quote, m_file.GetFullPath(), quote,
quote, getOutputExtension( m_info ), quote );
#endif #endif
} }
#ifdef __WINDOWS__ #ifdef __WINDOWS__