Homebrew / install

📥 Homebrew (un)installer
https://brew.sh
BSD 2-Clause "Simplified" License
2.15k stars 1.02k forks source link

install.sh should use /usr/bin/stat not stat (minor) #848

Closed DG12 closed 3 months ago

DG12 commented 3 months ago

Problem was from running the official install script

brew config
HOMEBREW_VERSION: 4.3.0-dirty
ORIGIN: https://github.com/Homebrew/brew
HEAD: 8378cc825d83acffd125fb0fec041793df378a57
Last commit: 4 days ago
Core tap JSON: 17 May 01:04 UTC
Core cask tap JSON: 17 May 01:04 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.fFNhibOXms/org.xquartz:0
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: 15.4
Rosetta 2: false

brew doctor

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  openssl@1.1

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libexiv2.0.28.1.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae and may need to be deleted.

Unexpected header files:
  /usr/local/include/exiv2/config.h
  /usr/local/include/exiv2/exiv2lib_export.h
  /usr/local/include/exiv2/exv_conf.h

Warning: Unbrewed '.pc' files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae and may need to be deleted.

Unexpected '.pc' files:
  /usr/local/lib/pkgconfig/exiv2.pc

Warning: You have uncommitted modifications to Homebrew/brew.
If this is a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
  cd /opt/homebrew && git stash -u && git clean -d -f

Uncommitted files:
   M README.md

trying to install lftp

Install ran with messages stat: can't use format 'f' with 'f'

Command output error message

  stat: can't use format 'f' with 'f'

  

What you expected to happen

An error free install

Step-by-step reproduction instructions

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

mistydemeo commented 3 months ago

I'm curious, what was the stat that was in the PATH?

DG12 commented 3 months ago

Custom version:

echo $' size\t'"        access        modification         change         Born "
export ccyymmdd=`date +"%m\/%d\/%y"`
export ccyy=`date +"%Y-"`

/usr/bin/stat -t "%x %X " -f"%z %Sa %Sm %Sc %SB %N" $* | sed "s/\"//g ; s/$ccyymmdd/__-__-__/g" | column -t

example: (pretty)

stat stat
 size           access        modification         change         Born   
1634  08/22/23  08:05:58  08/02/16  17:07:12  03/23/23  10:00:37  08/02/16  17:07:12  stat
/usr/bin/stat stat (pretty ugly!)
16777234 438405 -rwx--x--x 1 dgerman staff 0 1634 "Aug 22 08:05:58 2023" "Aug  2 17:07:12 2016" "Mar 23 10:00:37 2023" "Aug  2 17:07:12 2016" 4096 8 0 stat
stat /usr
 size           access        modification         change         Born   
352  04/26/24  06:46:19  04/26/24  06:46:19  04/26/24  06:46:19  04/26/24  06:46:19  /usr

/usr/bin/stat
316409225 2235 crw--w---- 1 dgerman tty 268435456 0 "May 18 13:31:33 2024" "May 18 13:31:33 2024" "May 18 13:31:33 2024" "Dec 31 19:00:00 1969" 65536 0 0 (stdin)
carlocab commented 3 months ago

Fixed in #849.