Trying to insert a custom header: The header file is at the base of my workspace in a file called HEADER.txt. I specify this name in the customHeaderFile settings.
Trying to create a LICENSE file from a custom header: Once again, I have set customHeaderFile to HEADER.txt
Expected behavior
The HEADER.txt in the workspace should be picked and inserted into the current file
The extension should create a file called LICENSE in the root of my workspace
Actual behavior
The first operation fails. This is what I see in devtools
A similar message is also shown as a notification
The second operation does nothing: No file created, no error notifications being shown. However, in devtools, I see the following:
Steps to reproduce the issue
See descriptions above
If it helps, here are the contents of HEADER.txt
Copyright (C) @YEAR@ @AUTHOR@
This file is part of @PROJECT@.
@PROJECT@ is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@PROJECT@ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with @PROJECT@. If not, see <https://www.gnu.org/licenses/>.
EDIT
It may not be clear from my report, but I should also add that doing any of the above with the pre-installed licenses, actually works. So the problem is definitely with the way custom licenses are handled, and I have a hunch it may be due to path issues, just from a casual glance into the extension code.
You may want to be using the workspace api for reading files from the current workspace, otherwise if you're using just fs, you should supply it the full path to the file if the file name is not absolute. Just a hint in case you're not already doing that.
Runtime environment
Linux ArcoB 5.8.14-arch1-1 #1 SMP PREEMPT Wed, 07 Oct 2020 23:59:46 +0000 x86_64 GNU/Linux
1.50.1
d2e414d9e4239a252d1ab117bd7067f125afd80a
Behaviors
HEADER.txt
. I specify this name in thecustomHeaderFile
settings.customHeaderFile
toHEADER.txt
Expected behavior
HEADER.txt
in the workspace should be picked and inserted into the current fileLICENSE
in the root of my workspaceActual behavior
The first operation fails. This is what I see in devtools
A similar message is also shown as a notification
The second operation does nothing: No file created, no error notifications being shown. However, in devtools, I see the following:
Steps to reproduce the issue
See descriptions above
If it helps, here are the contents of
HEADER.txt
EDIT
It may not be clear from my report, but I should also add that doing any of the above with the pre-installed licenses, actually works. So the problem is definitely with the way custom licenses are handled, and I have a hunch it may be due to path issues, just from a casual glance into the extension code. You may want to be using the workspace api for reading files from the current workspace, otherwise if you're using just
fs
, you should supply it the full path to the file if the file name is not absolute. Just a hint in case you're not already doing that.