mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 11:31:46 +00:00
refactor: simplify pnpm environment variable handling in clean script
This commit is contained in:
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -8,7 +8,7 @@ assignees: ''
|
||||
|
||||
## Describe the bug
|
||||
|
||||
A clear and concise description of what the bug is.
|
||||
A clear and concise description of what the bug is. We suggest using English for better global understanding.
|
||||
|
||||
## Steps to reproduce
|
||||
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -8,7 +8,7 @@ assignees: ''
|
||||
|
||||
## Feature description
|
||||
|
||||
A clear and concise description of the feature you'd like to see.
|
||||
A clear and concise description of the feature you'd like to see. We suggest using English for better global understanding.
|
||||
|
||||
## Use case
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@ clean_dev_npm() {
|
||||
# Clean pnpm store cache
|
||||
local pnpm_default_store=~/Library/pnpm/store
|
||||
# Check if pnpm is actually usable (not just Corepack shim)
|
||||
if command -v pnpm > /dev/null 2>&1 && env COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm --version > /dev/null 2>&1; then
|
||||
clean_tool_cache "pnpm cache" env COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm store prune
|
||||
if command -v pnpm > /dev/null 2>&1 && COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm --version > /dev/null 2>&1; then
|
||||
COREPACK_ENABLE_DOWNLOAD_PROMPT=0 clean_tool_cache "pnpm cache" pnpm store prune
|
||||
local pnpm_store_path
|
||||
start_section_spinner "Checking store path..."
|
||||
pnpm_store_path=$(run_with_timeout 2 env COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm store path 2> /dev/null) || pnpm_store_path=""
|
||||
pnpm_store_path=$(COREPACK_ENABLE_DOWNLOAD_PROMPT=0 run_with_timeout 2 pnpm store path 2> /dev/null) || pnpm_store_path=""
|
||||
stop_section_spinner
|
||||
if [[ -n "$pnpm_store_path" && "$pnpm_store_path" != "$pnpm_default_store" ]]; then
|
||||
safe_clean "$pnpm_default_store"/* "Orphaned pnpm store"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
dependency
|
||||
19
tests/tmp-clean-home.AKSUWT/bin/tmutil
Executable file
19
tests/tmp-clean-home.AKSUWT/bin/tmutil
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
if [[ "$1" == "status" ]]; then
|
||||
cat << 'TMUTIL_OUTPUT'
|
||||
Backup session status:
|
||||
{
|
||||
ClientID = "com.apple.backupd";
|
||||
Running = 1;
|
||||
}
|
||||
TMUTIL_OUTPUT
|
||||
elif [[ "$1" == "destinationinfo" ]]; then
|
||||
cat << 'DEST_OUTPUT'
|
||||
====================================================
|
||||
Name : TestBackup
|
||||
Kind : Local
|
||||
Mount Point : /Volumes/TestBackup
|
||||
ID : 12345678-1234-1234-1234-123456789012
|
||||
====================================================
|
||||
DEST_OUTPUT
|
||||
fi
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
echo "Already on latest version"
|
||||
Reference in New Issue
Block a user