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