Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cli_output/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _display_credit_line(plan_credits: dict) -> None:
# If naive datetime, assume UTC
if dt.tzinfo is None:
dt = dt.replace(tzinfo=timezone.utc)
formatted_date = dt.strftime("%b %-d, %Y")
formatted_date = f"{dt.strftime('%b')} {dt.day}, {dt.year}"

# Check if expired
now = datetime.now(timezone.utc)
Expand Down Expand Up @@ -62,7 +62,7 @@ def _display_bucket_credit_line(bucket: dict, label: str) -> None:
# If naive datetime, assume UTC
if dt.tzinfo is None:
dt = dt.replace(tzinfo=timezone.utc)
formatted_date = dt.strftime("%b %-d, %Y")
formatted_date = f"{dt.strftime('%b')} {dt.day}, {dt.year}"

# Check if expired
now = datetime.now(timezone.utc)
Expand Down
4 changes: 3 additions & 1 deletion install/bash/install.sh

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change in this script does not fix the root problem. These changes are here just to surface any errors that happen when codeplain --status is executed by the scripts. Right now, the output was not shown.

Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,12 @@ if [ -n "${CODEPLAIN_API_KEY:-}" ]; then
# Ensure the freshly installed tool is findable in this session.
export PATH="$HOME/.local/bin:$PATH"
echo -e "${GRAY}Verifying your installation...${NC}"
if codeplain --status > /dev/null 2>&1; then
if verify_output=$(codeplain --status 2>&1); then
echo -e "${GREEN}✓${NC} Installation verified."
else
echo -e "${RED}Something went wrong during installation.${NC}"
echo -e "${GRAY}Output of 'codeplain --status':${NC}"
echo "$verify_output"
echo -e "${GRAY}Please restart your terminal and try again, or reinstall with:${NC}"
echo -e " uv tool install --force codeplain"
exit 1
Expand Down
6 changes: 5 additions & 1 deletion install/powershell/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -426,16 +426,20 @@ if ($downloadExamples -notmatch '^[Nn]$') {
if ($env:CODEPLAIN_API_KEY) {
Write-Host "${GRAY}Verifying your installation...${NC}"
$verifyOk = $false
$verifyOutput = ""
try {
& codeplain --status *> $null
$verifyOutput = & codeplain --status 2>&1 | Out-String
$verifyOk = ($LASTEXITCODE -eq 0)
} catch {
$verifyOutput = $_ | Out-String
$verifyOk = $false
}
if ($verifyOk) {
Write-Host "${GREEN}✓${NC} Installation verified."
} else {
Write-Host "${RED}Something went wrong during installation.${NC}"
Write-Host "${GRAY}Output of 'codeplain --status':${NC}"
Write-Host $verifyOutput
Write-Host "${GRAY}Please restart your terminal and try again, or reinstall with:${NC}"
Write-Host " uv tool install --force codeplain"
exit 1
Expand Down
Loading