From 35a0a20f5c4fea6a08e1b91ff631b089eef8fc50 Mon Sep 17 00:00:00 2001 From: David Knaack Date: Sun, 8 Nov 2020 11:07:25 +0100 Subject: [PATCH] perf(init/pwsh): use get-random for session-key instead of invoking starship session (#1860) --- src/init/starship.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init/starship.ps1 b/src/init/starship.ps1 index 77fe4290..9a731c6e 100644 --- a/src/init/starship.ps1 +++ b/src/init/starship.ps1 @@ -66,4 +66,4 @@ function global:prompt { $ENV:STARSHIP_SHELL = "powershell" # Set up the session key that will be used to store logs -$ENV:STARSHIP_SESSION_KEY = (& ::STARSHIP:: session) +$ENV:STARSHIP_SESSION_KEY = -join ((48..57) + (65..90) + (97..122) | Get-Random -Count 16 | ForEach-Object { [char]$_ })