check file permissions
This commit is contained in:
parent
ddaa870668
commit
d72acba22c
@ -7,7 +7,7 @@
|
|||||||
- ♻️ - Edited
|
- ♻️ - Edited
|
||||||
|
|
||||||
## 0.2.2 - [08/04/2022]
|
## 0.2.2 - [08/04/2022]
|
||||||
- 🐛 - Before label emoji not insert space symbol (temponary change emoji)
|
- ➕ - Added password file check permissions
|
||||||
- ➕ - Added title by start program
|
- ➕ - Added title by start program
|
||||||
- ➕ - Added clear terminal by new search
|
- ➕ - Added clear terminal by new search
|
||||||
- ➕ - Added by start&close program clear terminal
|
- ➕ - Added by start&close program clear terminal
|
||||||
@ -15,6 +15,7 @@
|
|||||||
- ➕ - Added emoji to output
|
- ➕ - Added emoji to output
|
||||||
- ✔️ - Fixed BYE emoji color
|
- ✔️ - Fixed BYE emoji color
|
||||||
- ♻️ - Edited URL color & style output
|
- ♻️ - Edited URL color & style output
|
||||||
|
- 🐛 - Before label emoji not insert space symbol (temponary change emoji)
|
||||||
|
|
||||||
## 0.2.1 - [14/03/2022]
|
## 0.2.1 - [14/03/2022]
|
||||||
- ➕ - prompt '>' set color green
|
- ➕ - prompt '>' set color green
|
||||||
|
12
src/pmng.cr
12
src/pmng.cr
@ -80,6 +80,15 @@ while count < yaml.size
|
|||||||
count += 1
|
count += 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# check file ppermissions
|
||||||
|
password_file_permissions = File.info(password_file_path).permissions.to_s
|
||||||
|
|
||||||
|
if /\d{3}/.match(password_file_permissions).try &.[0] != "600"
|
||||||
|
puts "Password file permissions is not RW for you.".colorize(:red)
|
||||||
|
|
||||||
|
exit(1)
|
||||||
|
end
|
||||||
|
|
||||||
# pmng title
|
# pmng title
|
||||||
system "clear"
|
system "clear"
|
||||||
puts "The very simple password manager for humans".colorize(:yellow).mode(:bold)
|
puts "The very simple password manager for humans".colorize(:yellow).mode(:bold)
|
||||||
@ -142,7 +151,8 @@ while loop
|
|||||||
puts item.email.colorize(:red)
|
puts item.email.colorize(:red)
|
||||||
end
|
end
|
||||||
if !item.login.blank?
|
if !item.login.blank?
|
||||||
print "🏷️ "
|
# print "🏷️ " # Bug
|
||||||
|
print "🗿 "
|
||||||
puts item.login.colorize(:yellow)
|
puts item.login.colorize(:yellow)
|
||||||
end
|
end
|
||||||
if !item.password.blank?
|
if !item.password.blank?
|
||||||
|
Loading…
Reference in New Issue
Block a user