You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of my scripts calls Set-StrictMode -Version Latest; initially, and I've noticed that touch fails in this mode:
Set-StrictMode -Version Latest;
touch <file>
The property 'A' cannot be found on this object. Verify that the property exists.
At ...\touch.ps1:45 char:4
+ if($opts.A) {
+ ~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : PropertyNotFoundStrict
This can either be fixed by not accessing hashtable contents as members, but using the indexer, or by calling Set-StrictMode -Off at the beginning of the file.
Hope you fix this as I love your tools :-) And I'd be happy to make a PR with the change you'd prefer.
The text was updated successfully, but these errors were encountered:
Most of my scripts calls
Set-StrictMode -Version Latest;
initially, and I've noticed that touch fails in this mode:This can either be fixed by not accessing hashtable contents as members, but using the indexer, or by calling
Set-StrictMode -Off
at the beginning of the file.Hope you fix this as I love your tools :-) And I'd be happy to make a PR with the change you'd prefer.
The text was updated successfully, but these errors were encountered: