speedata / publisher

speedata Publisher - a professional database Publishing system
https://www.speedata.de/
GNU Affero General Public License v3.0
293 stars 36 forks source link

`print(package.config:sub(1,1))` nil error #485

Closed pr-apes closed 1 year ago

pr-apes commented 1 year ago

@pgundlach,

minimal filter:

print(package.config:sub(1,1))

if true then
  os.exit(0)
end

Invoking it with sp --filter=filter.lua, I get:

C:\helloworld\filter.lua:1: attempt to index a non-table object(nil) with key 'sub'
stack traceback:
    C:\\helloworld\filter.lua:1: in main chunk
    [G]: ?

I don't know whether I'm missing something.

Many thanks for your help.

pgundlach commented 1 year ago

Works here on macOS. Maybe this is a windows issue. I'll have a look on next Monday.

pgundlach commented 1 year ago

Confirmed that package.config is nil on windows

pgundlach commented 1 year ago

package.config will be part of the next version

pr-apes commented 1 year ago

Many thanks for the fix.

pr-apes commented 1 year ago

Sorry, I didn't want to close the issue.

pgundlach commented 1 year ago

Should work in the current version (4.13.12) which is online now.

pgundlach commented 1 year ago

I will close this as fixed. If there are still problems, please re-open.

pr-apes commented 1 year ago

It works fine now.

Many thanks for the new release.