MaikMichel / dbFlux

VSCode Extension to build PL/SQL and export APEX Apps and REST Moduls
MIT License
18 stars 0 forks source link

Problems with spaces in path #9

Closed brMichael closed 7 months ago

brMichael commented 1 year ago

Hey Maik,

I find it "uncomfortable" that the path to my project directory may (or should) not contain any spaces. I like to name my directories in proper language. Say, I want to organize my projects according to the context in directories like D:\Own Projects\APEX Apps or D:\Own Projects\APEX Plugins or D:\work\My Client\APEX and so on, and I dislike using things like camel case notation or underscores. Now, while I totally agree with avoiding spaces in paths and file names within the project structure, the path to the project root should allow such spaces.

The particular problem, dbFlux causes, that made me write this issue, is within the "build" (rather upload) task of a javascript file. The upload works without problems. After the upload, dbFlux tries to move the generated sql file to f100/dist/js. Now, my project root is in D:\private\APEX Plugins. Due to the space in "APEX Plugins", the MV command tries to move D:\private\APEX to Plugins\myPlugin\static\f100\dist\js\myPlugin.js.sql which fortunately fails because the target is not a directory - which is exactly what the error message of MV says.

Connection:  apex_plugins@localhost:1521/xepdb1
Sourcefile:  static/f100/src/js/myPlugin.js (Trigger only: NO)
OS-Now:      30.01.23_08:44:18,31699
DB-User:     APEX_PLUGINS
DB-Name:     XEPDB1
DB-Now:      30.01.23 08:44:26,646491000 +01:00
 ... File uploaded as: js/myPlugin.js
 ... File uploaded as: js/myPlugin.min.js
 ... File uploaded as: js/myPlugin.js.map

PL/SQL-Prozedur erfolgreich abgeschlossen.

Successful   30.01.23 08:44:28,051397000 +01:00
mv: target 'Plugins/my_plugin/static/f100/dist/js/myPlugin.js.sql' is not a directory
Reference file by using: #APP_FILES#js/myPlugin#MIN#.js
-----------------------------------------------------

 *  Terminal will be reused by tasks, press any key to close it.

I am sure that this is not the only spot where spaces in the path to the project cause problems. It's just the most recent one. Uploading CSS files will most likely have the same effect. I can provide more spots once i stumble upon them.

I'd love to see dbFlux being able to handle this. Should be working, when using double quotes on bash operations that receive a path as parameter.

Thanks and thumbsup for this great extension!

MaikMichel commented 7 months ago

Fixed