Skip to content

[Bug] "[datetime]$lastExec = $null" throws error on profile load #177

@SkipTutorial

Description

@SkipTutorial

When loading the profile on PowerShell 7, the script errors with:

[datetime]$lastExec = $null
Cannot convert null to type "System.DateTime".

This can be fixed by changing

[datetime]$lastExec = $null

to

[Nullable[datetime]]$lastExec = $null

or omitting the type until set. Since overrides are not supported for this variable, users cannot work around this as per the repo's guidance.

"I have enjoyed and utilized various bash scripts I've been apparently absolutely oblivious how spaghetti like WinShell is so kudos to you guys"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions