mirror of
https://github.com/danielmiessler/fabric
synced 2024-11-10 07:10:31 +00:00
fixed a setup.sh error that would occur on macos
This commit is contained in:
parent
6712759c50
commit
654410530c
@ -388,14 +388,6 @@ class Alias:
|
||||
for pattern in allPatterns:
|
||||
self.remove(pattern)
|
||||
|
||||
def find_line(self, name):
|
||||
for file in self.config_files:
|
||||
with open(file, "r") as f:
|
||||
lines = f.readlines()
|
||||
for line in lines:
|
||||
if line.strip("\n") == f"alias ${name}='{alias}'":
|
||||
return line
|
||||
|
||||
def add_patterns(self):
|
||||
allPatterns = os.listdir(self.patterns)
|
||||
for pattern in allPatterns:
|
||||
|
4
setup.sh
4
setup.sh
@ -40,8 +40,8 @@ for config_file in "${config_files[@]}"; do
|
||||
echo -e "\n# Load custom aliases\n$source_line" >> "$config_file"
|
||||
echo "Added source command for $bootstrap_file in $config_file."
|
||||
fi
|
||||
sed -i '/alias fabric=/d' "$config_file"
|
||||
sed -i '/fabric --pattern/d' "$config_file"
|
||||
sed -i '' '/alias fabric=/d' "$config_file"
|
||||
sed -i '' '/fabric --pattern/d' "$config_file"
|
||||
|
||||
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user