<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Scripted Git clone / checkout being blocked by "Project Environment" popup</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/9b04b86623/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/9b04b86623/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/9b04b86623/</id><updated>2023-12-05T15:23:38.829000Z</updated><subtitle>Recent posts to Scripted Git clone / checkout being blocked by "Project Environment" popup</subtitle><entry><title>Scripted Git clone / checkout being blocked by "Project Environment" popup</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/9b04b86623/?limit=25#c897" rel="alternate"/><published>2023-12-05T15:23:38.829000Z</published><updated>2023-12-05T15:23:38.829000Z</updated><author><name>rkohser</name><uri>https://forge.codesys.com/u/rkohser/</uri></author><id>https://forge.codesys.comd00a03388496c95c5c6d0d6ffaddf251fcf94f8a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am trying to build a CI/CD pipeline around our codesys projects.&lt;br/&gt;
The only entry point if the git url and branch, as we do not put our project file under source control, so we needed to find a way to git clone from the python scripting engine.&lt;br/&gt;
This is currently how we do this : &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;system.commands["Git", "Clone"].execute(
    "ProjectLocation=" + project_dir,
    "ProjectName=" + project_file_name,
    "RemoteUrl=" + project_git_remote_url,
    "GitProjectStoragePath=" + project_git_local_dir,
)
system.commands["Git", "Checkout", "Branch"].execute(
    "PrimaryProjectHandle=0", "BranchName=origin/" + project_git_branch
)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This works fine, except that, depending on the environment and the project, the "Project Environment" popup gets displayed to suggest for some updates, and waits for a user interaction, even with the "--noUI" flag injected as parameter.&lt;br/&gt;
I investigated the VersionUpdateFlags, but the problem is that the git clone is an atomic operation that clones and directly opens the generated project without the possibility to inject any updateFlags argument (only used in the ScripProjects.open() function.&lt;br/&gt;
I also tried to simulate some keyboard events acknowledge the window from script but I did not find the right location for the SendKeys statement, I think before the git clone call is too early and after is too late.&lt;br/&gt;
So I am wondering if there would be some other way to do that. Is there some more proper scripting api for the git add on ? Is there a global configuration of the VersionUpdateFlags that would allow the popup to be disabled outside from any project context ? Is there some way to automatically acknowledge this kind of messages in a "--noUI" mode ? What do you suggest ?&lt;/p&gt;
&lt;p&gt;Thanks for your help,&lt;/p&gt;
&lt;p&gt;Roland&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>