Raphael Posted March 21, 2018 Report Share Posted March 21, 2018 Hello ! I want to create a trigger that work with path I include spaces. How do I do that ? Assuming I have a path like this : workspacesFolder/to my script/helloworld.bat Creating a trigger for that script will not work at all because of the spaces I tried also using the environment variable @WK_SPACES but It seems to be not working as well The command I used : cm maketrigger after-setselector "output somessss text to file" "C:/Triggers Test/dummy.bat" --filter="/main/DwarfNet/card_shuffle_server_bat" --server=alwayson:8087 I don't have any problems creating trigger with non-blank path. PLASTIC VERSION USED : 5.4.16.0 Thanks, Raphael Link to comment Share on other sites More sharing options...
Raphael Posted March 23, 2018 Author Report Share Posted March 23, 2018 UP Link to comment Share on other sites More sharing options...
kennethharder Posted March 24, 2018 Report Share Posted March 24, 2018 Hi there. I am also very interested in finding a solution to this problem. I have tried: Using backslash before extra qoutes "\"C:/path to file"\" Using two double qoutes ""C:/path to file"" Using single qoutes both before and after the double qoutes "'C:/path to file'" and '"C:/path to file"' Using parentheses "(C:/path to file)" and ("C:/path to file") I can mention that I am running the plastic server on a linux machine. Link to comment Share on other sites More sharing options...
S_Luis Posted March 25, 2018 Report Share Posted March 25, 2018 On 3/21/2018 at 2:09 PM, Raphael said: Hello ! I want to create a trigger that work with path I include spaces. How do I do that ? Assuming I have a path like this : workspacesFolder/to my script/helloworld.bat Creating a trigger for that script will not work at all because of the spaces I tried also using the environment variable @WK_SPACES but It seems to be not working as well The command I used : cm maketrigger after-setselector "output somessss text to file" "C:/Triggers Test/dummy.bat" --filter="/main/DwarfNet/card_shuffle_server_bat" --server=alwayson:8087 I don't have any problems creating trigger with non-blank path. PLASTIC VERSION USED : 5.4.16.0 Thanks, Raphael Hi! To create triggers with spaces in the executable path, you have to wrap it inside single inverted commas (or single quotation marks). I created my trigger (using Plastic SCM 7.0.16.2074) the following way : cm maketrigger after-setselector "test for Raphael" "'C:\Users\sergi\Destkop\directory with spaces\trigger.bat'" I have checked the documentation and the $WK_SPACES environment variable does not exist. Maybe you meant $PLASTIC_WORKSPACE_PATH? You can take a look to the available environment variables for each trigger in the documentation here: https://www.plasticscm.com/documentation/triggers/plastic-scm-version-control-triggers-guide.shtml Hope it helped! Link to comment Share on other sites More sharing options...
S_Luis Posted March 25, 2018 Report Share Posted March 25, 2018 On 3/24/2018 at 3:23 PM, kennethharder said: Hi there. I am also very interested in finding a solution to this problem. I have tried: Using backslash before extra qoutes "\"C:/path to file"\" Using two double qoutes ""C:/path to file"" Using single qoutes both before and after the double qoutes "'C:/path to file'" and '"C:/path to file"' Using parentheses "(C:/path to file)" and ("C:/path to file") I can mention that I am running the plastic server on a linux machine. Hi! I supposed you read my previous answer to this thread. Still, if the trigger is a client-side one, and your client is running in a Windows machine, you'll still have to indicate the path of the executable using single quotation marks , regardless of the server being a Linux machine. So, the entire command of the trigger should be inside double quoation marks, and the executable, if it contains spaces, should be inside single quotation marks. For example: "'C:\Users\sergi\Desktop\directory with spaces\trigger without params.bat'" If your trigger needs parameters: "'C:\Users\sergi\Desktop\directory with spaces\trigger with params.bat' '<param_1>' '<param_2>' (...)" Hope it helped! Link to comment Share on other sites More sharing options...
Raphael Posted March 26, 2018 Author Report Share Posted March 26, 2018 Hello S_Luis, I tried to put quotes and that's not working. I ran this command : cm maketrigger after-setselector "output somessss text to file" "'C:/Users/Test/wkspaces/Triggers Directory/Triggers/dummy.bat'" --filter="/main/Net/server_bat" --server=myservertest:8087 Maybe that could come from the plastic version that I use. Link to comment Share on other sites More sharing options...
S_Luis Posted March 26, 2018 Report Share Posted March 26, 2018 5 minutes ago, Raphael said: Hello S_Luis, I tried to put quotes and that's not working. I ran this command : cm maketrigger after-setselector "output somessss text to file" "'C:/Users/Test/wkspaces/Triggers Directory/Triggers/dummy.bat'" --filter="/main/Net/server_bat" --server=myservertest:8087 Maybe that could come from the plastic version that I use. Hi, If you move the trigger to a directory without spaces in its name, and you use the same filter and server parameters, does it correctly run? Link to comment Share on other sites More sharing options...
Raphael Posted March 26, 2018 Author Report Share Posted March 26, 2018 Yes I already tried a folder without spaces and he's working just fine Link to comment Share on other sites More sharing options...
Raphael Posted March 26, 2018 Author Report Share Posted March 26, 2018 Thanks for the help S_Luis ! I will do more testing with updated plastic version and see If I can get it working and I will post here again Link to comment Share on other sites More sharing options...
Raphael Posted March 26, 2018 Author Report Share Posted March 26, 2018 So I updated to plastic version 7.0.16.2074 and this is working. I can't get the $PLASTIC_WORKSPACE_PATH to work with blank spaces path also. But I need the trigger to work on my server version 5.4.16.0. Someone got an idea ? Link to comment Share on other sites More sharing options...
S_Luis Posted March 26, 2018 Report Share Posted March 26, 2018 5 hours ago, Raphael said: So I updated to plastic version 7.0.16.2074 and this is working. I can't get the $PLASTIC_WORKSPACE_PATH to work with blank spaces path also. But I need the trigger to work on my server version 5.4.16.0. Someone got an idea ? I find it weird that your build number is zero (5.4.16.0). That number varies with every release independently of the major (5) minor (4) and compatibility (16) numbers. Do you remember when, and from where, did you install your server? :-S Link to comment Share on other sites More sharing options...
Raphael Posted March 27, 2018 Author Report Share Posted March 27, 2018 Hey S_Luis, My client build number is 5.4.16.918 I don't really know about the server build number at the moment, should be the same. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.