Jira (PUP-9298) Update directory? check on cwd in Execution.execute

2 views
Skip to first unread message

Sean McDonald (JIRA)

unread,
Nov 1, 2018, 1:15:09 PM11/1/18
to puppe...@googlegroups.com
Sean McDonald created an issue
 
Puppet / Task PUP-9298
Update directory? check on cwd in Execution.execute
Issue Type: Task Task
Assignee: Unassigned
Created: 2018/11/01 10:14 AM
Priority: Normal Normal
Reporter: Sean McDonald

Puppet::Util::Execution.execute checks for the existence of the cwd specified when the :cwd option is given using Puppet::FileSystem.directory?

However, Puppet::FileSystem.directory? currently can return a false negative with reparse points (symlinks) in windows. We should refactor that function so it works with reparse points.

A change to refactor Puppet::FileSystem.dirctory? is likely too risky to introduce in a Z release, so we'll need to introduce two fixes: one that's safer for Z releases and one to actually fix Puppet::FileSystem.directory?

Note that Puppet::Util::Windows::File.exist? works for directories as well (the underlying windows API used in that function is for files or directories), so that's likely the solution here:

For the Z release streams we can simply have the check cwd use Puppet::Util::Windows::File.exist? on windows and directory? everywhere else. Then the change to the master branch should be to actually leverage Puppet::Util::Windows::File.exist? inside the windows specific Puppet::FileSystem.dirctory?

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Sean McDonald (JIRA)

unread,
Nov 1, 2018, 1:16:09 PM11/1/18
to puppe...@googlegroups.com
Sean McDonald updated an issue
Change By: Sean McDonald
Sprint: Platform OS Kanban

Sean McDonald (JIRA)

unread,
Nov 1, 2018, 1:20:47 PM11/1/18
to puppe...@googlegroups.com

Geoff Nichols (JIRA)

unread,
Jan 30, 2019, 2:53:03 PM1/30/19
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: Platform OS Kanban

Josh Cooper (Jira)

unread,
Jun 14, 2021, 7:11:03 PM6/14/21
to puppe...@googlegroups.com
Josh Cooper commented on Task PUP-9298
 
Re: Update directory? check on cwd in Execution.execute

This ticket hasn't been updated in several years, so I'm going to close. Please reopen if the issue persists.

This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages