Skip to content

Commit

Permalink
users: Avoid number argument in cockpit.spawn()
Browse files Browse the repository at this point in the history
It gets stringified along the way, but this is untidy and a type
violation.
  • Loading branch information
martinpitt authored and jelly committed Dec 10, 2024
1 parent dc0c9a3 commit a906a89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/users/account-logs-panel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const _ = cockpit.gettext;
export function AccountLogs({ name }) {
const [logins, setLogins] = useState([]);
useInit(() => {
cockpit.spawn(["last", "--time-format", "iso", "-n", 25, name], { environ: ["LC_ALL=C"] })
cockpit.spawn(["last", "--time-format", "iso", "-n25", name], { environ: ["LC_ALL=C"] })
.then(data => {
let logins = [];
data.split('\n').forEach(line => {
Expand Down

0 comments on commit a906a89

Please sign in to comment.