privacy.sexy
privacy.sexy copied to clipboard
[BUG]: Just a small bug when you want to change automatic updates to manual updates
Problem
--- Disable Visual Studio Code automatic updates in favor of manual updates
manual : The term 'manual' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:42 + $settingKey='update.mode'; $settingValue=manual; $jsonFilePath = "$($ ... + ~~~~~~ + CategoryInfo : ObjectNotFound: (manual:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
Solution
- The error is occurring because the value "manual" is being interpreted as a command or function, not as a string.
- You need to enclose the value "manual" in single quotes to treat it as a string.
- Before
:: Disable Visual Studio Code automatic updates in favor of manual updates
echo --- Disable Visual Studio Code automatic updates in favor of manual updates
PowerShell -ExecutionPolicy Unrestricted -Command "$settingKey='update.mode'; $settingValue=manual; $jsonFilePath = "^""$($env:APPDATA)\Code\User\settings.json"^""; if (!(Test-Path $jsonFilePath -PathType Leaf)) {; Write-Host "^""Skipping, no updates. Settings file was not at `"^""$jsonFilePath`"^""."^""; exit 0; }; try {; $fileContent = Get-Content $jsonFilePath -ErrorAction Stop; } catch {; throw "^""Error, failed to read the settings file: `"^""$jsonFilePath`"^"". Error: $_"^""; }; if ([string]::IsNullOrWhiteSpace($fileContent)) {; Write-Host "^""Settings file is empty. Treating it as default empty JSON object."^""; $fileContent = "^""{}"^""; }; try {; $json = $fileContent | ConvertFrom-Json; } catch {; throw "^""Error, invalid JSON format in the settings file: `"^""$jsonFilePath`"^"". Error: $_"^""; }; $existingValue = $json.$settingKey; if ($existingValue -eq $settingValue) {; Write-Host "^""Skipping, `"^""$settingKey`"^"" is already configured as `"^""$settingValue`"^""."^""; exit 0; }; $json | Add-Member -Type NoteProperty -Name $settingKey -Value $settingValue -Force; $json | ConvertTo-Json | Set-Content $jsonFilePath; Write-Host "^""Successfully applied the setting to the file: `"^""$jsonFilePath`"^""."^"""
- After:
echo --- Disable Visual Studio Code automatic updates in favor of manual updates
PowerShell -ExecutionPolicy Unrestricted -Command "$settingKey='update.mode'; $settingValue='manual'; $jsonFilePath = "^""$($env:APPDATA)\Code\User\settings.json"^""; if (!(Test-Path $jsonFilePath -PathType Leaf)) {; Write-Host "^""Skipping, no updates. Settings file was not at `"^""$jsonFilePath`"^""."^""; exit 0; }; try {; $fileContent = Get-Content $jsonFilePath -ErrorAction Stop; } catch {; throw "^""Error, failed to read the settings file: `"^""$jsonFilePath`"^"". Error: $_"^""; }; if ([string]::IsNullOrWhiteSpace($fileContent)) {; Write-Host "^""Settings file is empty. Treating it as default empty JSON object."^""; $fileContent = "^""{}"^""; }; try {; $json = $fileContent | ConvertFrom-Json; } catch {; throw "^""Error, invalid JSON format in the settings file: `"^""$jsonFilePath`"^"". Error: $_"^""; }; $existingValue = $json.$settingKey; if ($existingValue -eq $settingValue) {; Write-Host "^""Skipping, `"^""$settingKey`"^"" is already configured as `"^""$settingValue`"^""."^""; exit 0; }; $json | Add-Member -Type NoteProperty -Name $settingKey -Value $settingValue -Force; $json | ConvertTo-Json | Set-Content $jsonFilePath; Write-Host "^""Successfully applied the setting to the file: `"^""$jsonFilePath`"^""."^"""
Thank you for the clear report. This will be fixed in a patch release later on once I realize 0.13.0
.
You can also try adding meta data such as 'keywords', 'og:url', and other tags for SEO so that more users will get inspired and attracted by it
The bug is fixed as part of 0.13.1 🚀. Thank you again @plantindesk.
Regarding meta tags, does keywords
and og:url
really add/contribute to anything? I don't know much about these tags/SEO.
Closing this issue as the main problem is resolved.
Example of techradar
When a user shares a link on apps like WhatsApp, the app automatically embeds the linked page's metadata, including images and descriptions, which are defined by specific meta tags such as og:url and og:description. However, for search engines like Google, having relevant keywords in the meta tag name="keywords" is still important for indexing and ranking purposes. It's essential to optimize both the content and metadata of web pages to ensure visibility and engagement across different platforms and search results.