* Making file writable
@ 2020-11-27 20:19 John Soo
2020-11-27 21:12 ` Tomás Ortín Fernández
0 siblings, 1 reply; 5+ messages in thread
From: John Soo @ 2020-11-27 20:19 UTC (permalink / raw)
To: Tomás Ortín Fernández; +Cc: Help-Guix
Hey Tomás,
Check your parens:
(for-each (make-file-writable (find-files "\\.yml$")))
Should be
(for-each make-file-writable (find-files "\\.yml$"))
That’s because for-each is a higher order function which takes a procedure and a list.
Good luck!
- John
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Making file writable
2020-11-27 20:19 Making file writable John Soo
@ 2020-11-27 21:12 ` Tomás Ortín Fernández
2020-11-27 23:22 ` John Soo
0 siblings, 1 reply; 5+ messages in thread
From: Tomás Ortín Fernández @ 2020-11-27 21:12 UTC (permalink / raw)
To: John Soo; +Cc: Help-Guix
Hello John,
You're right, but that's only because I made a mistake when pasting it on my email client, sorry :)
I think the problem is related to the phase when it runs. However, I don't understand why the current package for version 0.88 doesn't have that issue...
Thank you for your reply!
Tomás
On 11/27/20 9:19 PM, John Soo wrote:
> Hey Tomás,
>
> Check your parens:
>
> (for-each (make-file-writable (find-files "\\.yml$")))
>
> Should be
>
> (for-each make-file-writable (find-files "\\.yml$"))
>
> That’s because for-each is a higher order function which takes a procedure and a list.
>
> Good luck!
>
> - John
>
>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Making file writable
@ 2020-11-27 18:53 Tomás Ortín Fernández
0 siblings, 0 replies; 5+ messages in thread
From: Tomás Ortín Fernández @ 2020-11-27 18:53 UTC (permalink / raw)
To: help-guix
I'm trying to pack the updated version of rubocop (1.4.2). The problem is that a patch must be applied, and it affects two files that aren't writable, .rubocop.yml and .rubocop_todo.yml. I've tried making it writable after unpacking:
(arguments ...
...
(add-after 'unpack 'make-yml-files-writable
(lambda _
(let ((yml-files (find-files "\\.yml$")))
(for-each make-file-writable yml-files))
#t))
...)
I've tried as well doing it with a snippet:
(source ...
...
(modules '((guix build utils)))
(snippet
'(begin
(for-each (make-file-writable (find-files "\\.yml$")))
#t))
...)
However, I haven't been successful and the files remain non-writable when the patch is applied. What am I doing wrong?
Tomás
^ permalink raw reply [flat|nested] 5+ messages in thread
* Making file writable
@ 2020-11-27 18:18 Tomás Ortín Fernández
0 siblings, 0 replies; 5+ messages in thread
From: Tomás Ortín Fernández @ 2020-11-27 18:18 UTC (permalink / raw)
To: help-guix
I'm trying to pack the updated version of rubocop (1.4.2). The problem is that a patch must be applied, and it affects two files that aren't writable, .rubocop.yml and .rubocop_todo.yml. I've tried making it writable after unpacking:
(arguments ...
...
(add-after 'unpack 'make-yml-files-writable
(lambda _
(let ((yml-files (find-files "\\.yml$")))
(for-each make-file-writable yml-files))
#t))
...)
I've tried as well doing it with a snippet:
(source ...
...
(modules '((guix build utils)))
(snippet
'(begin
(for-each (make-file-writable (find-files "\\.yml$")))
#t))
...)
However, I haven't been successful and the files remain non-writable when the patch is applied. What am I doing wrong?
Tomás
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-11-27 23:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-27 20:19 Making file writable John Soo
2020-11-27 21:12 ` Tomás Ortín Fernández
2020-11-27 23:22 ` John Soo
-- strict thread matches above, loose matches on Subject: below --
2020-11-27 18:53 Tomás Ortín Fernández
2020-11-27 18:18 Tomás Ortín Fernández
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).