<div dir="ltr"><div>Hello,</div><div><br></div>I am developing the AmigoCloud driver for GDAL, and I have a question about '-config' command line option.<div><br></div><div>When I use a space it seems to work, but when I use '=', which seems like a correct way of doing it, I get the token string with unwanted chars at the end of it.</div><div><br></div><div>Here is how I call it with space. I get good result:</div><div>victor$ ./apps/ogrinfo --config AMIGOCLOUD_API_KEY MY_TOKEN -al "AmigoCloud:14200"<br></div><div><div>AMIGOCLOUD_API_KEY: 'MY_TOKEN'</div><div><br></div><div>When I call it with '=' it's not good:</div><div><div>victor$ ./apps/ogrinfo --config AMIGOCLOUD_API_KEY=MY_TOKEN -al "AmigoCloud:14200"</div><div>AMIGOCLOUD_API_KEY: 'MY_TOKEN=-al'</div><div><br></div><div>This is the code I use to get the token:</div><div><pre style="background-color:rgb(43,43,43);color:rgb(169,183,198);font-family:Menlo;font-size:10.5pt">osAPIKey = CSLFetchNameValueDef(papszOpenOptionsIn<span style="color:rgb(204,120,50)">, </span><span style="color:rgb(106,135,89)">"AMIGOCLOUD_API_KEY"</span><span style="color:rgb(204,120,50)">,<br></span><span style="color:rgb(204,120,50)"> </span>CPLGetConfigOption(<span style="color:rgb(106,135,89)">"AMIGOCLOUD_API_KEY"</span><span style="color:rgb(204,120,50)">, </span><span style="color:rgb(106,135,89)">""</span>))<span style="color:rgb(204,120,50)">;<br></span><span style="color:rgb(204,120,50)"><br></span>printf(<span style="color:rgb(106,135,89)">"AMIGOCLOUD_API_KEY: '%s'</span><span style="color:rgb(204,120,50)">\n</span><span style="color:rgb(106,135,89)">"</span><span style="color:rgb(204,120,50)">, </span>osAPIKey.c_str())<span style="color:rgb(204,120,50)">;<br></span></pre></div><div>Am I doing something wrong in my code, or the space is the way to go?</div><div><br></div><div>Thanks,</div><div><div class="gmail_signature"><div dir="ltr"><div><b>Victor Chernetsky</b></div><div><b><br></b></div><div><div><b><img src="http://www.amigocloud.com/static/homepage/img/e-mail-signature.png" width="96" height="22"><br></b><div><font color="#000000">+1 </font><font color="#000000">(408) 368-4607</font></div><div><a href="mailto:victor@amigocloud.com" style="color:rgb(17,85,204)" target="_blank">victor@amigocloud.com</a><br></div></div></div></div></div></div>
</div></div></div>